2014-11-10 Richard Biener <rguenther@suse.de>
PR middle-end/63798
* expr.c (expand_expr_real_2): When expanding FMA_EXPRs
properly treat the embedded multiplication as commutative
when looking for feeding negates.
From-SVN: r217287
+2014-11-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/63798
+ * expr.c (expand_expr_real_2): When expanding FMA_EXPRs
+ properly treat the embedded multiplication as commutative
+ when looking for feeding negates.
+
2014-11-10 Joern Rennecke <joern.rennecke@embecosm.com>
* config/avr/avr.h (CPLUSPLUS_CPP_SPEC): Define.
}
def0 = get_def_for_expr (treeop0, NEGATE_EXPR);
+ /* The multiplication is commutative - look at its 2nd operand
+ if the first isn't fed by a negate. */
+ if (!def0)
+ {
+ def0 = get_def_for_expr (treeop1, NEGATE_EXPR);
+ /* Swap operands if the 2nd operand is fed by a negate. */
+ if (def0)
+ {
+ tree tem = treeop0;
+ treeop0 = treeop1;
+ treeop1 = tem;
+ }
+ }
def2 = get_def_for_expr (treeop2, NEGATE_EXPR);
op0 = op2 = NULL;