summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
321a43b)
* tree-ssa-reassoc.c (eliminate_plus_minus_pair): Handle BIT_NOT_EXPR
to simplify a + ~a.
* gfortran.dg/reassoc_6.f: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158645
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-04-22 Alexander Monakov <amonakov@ispras.ru>
+
+ * tree-ssa-reassoc.c (eliminate_plus_minus_pair): Handle BIT_NOT_EXPR
+ to simplify a + ~a.
+
2010-04-22 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* tree-parloops.c (loop_parallel_p): New argument
2010-04-22 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* tree-parloops.c (loop_parallel_p): New argument
+2010-04-22 Alexander Monakov <amonakov@ispras.ru>
+
+ * gfortran.dg/reassoc_6.f: New testcase.
+
2010-04-22 Bernd Schmidt <bernds@codesourcery.com>
PR middle-end/29274
2010-04-22 Bernd Schmidt <bernds@codesourcery.com>
PR middle-end/29274
static VEC(tree, heap) *plus_negates;
static VEC(tree, heap) *plus_negates;
-/* If OPCODE is PLUS_EXPR, CURR->OP is really a negate expression,
- look in OPS for a corresponding positive operation to cancel it
- out. If we find one, remove the other from OPS, replace
- OPS[CURRINDEX] with 0, and return true. Otherwise, return
- false. */
+/* If OPCODE is PLUS_EXPR, CURR->OP is a negate expression or a bitwise not
+ expression, look in OPS for a corresponding positive operation to cancel
+ it out. If we find one, remove the other from OPS, replace
+ OPS[CURRINDEX] with 0 or -1, respectively, and return true. Otherwise,
+ return false. */
static bool
eliminate_plus_minus_pair (enum tree_code opcode,
static bool
eliminate_plus_minus_pair (enum tree_code opcode,
/* CURR->OP is a negate expr in a plus expr: save it for later
inspection in repropagate_negates(). */
/* CURR->OP is a negate expr in a plus expr: save it for later
inspection in repropagate_negates(). */
- VEC_safe_push (tree, heap, plus_negates, curr->op);
+ if (negateop != NULL_TREE)
+ VEC_safe_push (tree, heap, plus_negates, curr->op);