[tree-ssa-branch] Don't simplify target builtins [patch]
Diego Novillo
dnovillo@redhat.com
Thu Jul 4 14:10:00 GMT 2002
Caught while bootstrapping on ia64. __builtin_ia64_flushrs has
the same builtin code than STRNCMP, but since it doesn't take any
arguments, is_simplifiable_builtin was segfaulting when trying to
access the argument list.
In the future we may want to add a target hook to simplify target
builtins.
Diego.
* tree-simple.c (is_simplifiable_builtin): Don't simplify target
builtins.
Index: tree-simple.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-simple.c,v
retrieving revision 1.1.4.2
diff -d -u -p -r1.1.4.2 tree-simple.c
--- tree-simple.c 29 Jun 2002 18:08:04 -0000 1.1.4.2
+++ tree-simple.c 4 Jul 2002 20:21:44 -0000
@@ -1017,6 +1017,12 @@ is_simplifiable_builtin (expr)
if (decl == NULL_TREE || !DECL_BUILT_IN (decl))
return 1;
+ /* Do not simplify target-defined builtin functions.
+ FIXME: Maybe we should add a target hook for allowing this in the
+ future. */
+ if (DECL_BUILT_IN_CLASS (decl) == BUILT_IN_MD)
+ return 0;
+
fcode = DECL_FUNCTION_CODE (decl);
switch (fcode)
More information about the Gcc-patches
mailing list