[Bug middle-end/31531] A microoptimization of isnegative of signed integer
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Apr 10 18:20:00 GMT 2007
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-04-10 19:20 -------
A quick patch like:
Index: expr.c
===================================================================
--- expr.c (revision 123691)
+++ expr.c (working copy)
@@ -6828,7 +6828,7 @@
tree type;
int unsignedp;
enum machine_mode mode;
- enum tree_code code = TREE_CODE (exp);
+ enum tree_code code;
optab this_optab;
rtx subtarget, original_target;
int ignore;
@@ -6840,6 +6840,9 @@
type) \
: (expr))
+ if (TREE_CODE (exp) != COND_EXPR && !GIMPLE_TUPLE_P (exp))
+ exp = fold (exp);
+ code = TREE_CODE(exp);
if (GIMPLE_STMT_P (exp))
{
type = void_type_node;
Makes all functions emit the same code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31531
More information about the Gcc-bugs
mailing list