re PR tree-optimization/63798 (FAIL: gcc.target/powerpc/ppc-fmadd-1.c scan-assembler-not f(add|sub|mul|neg))
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
This commit is contained in:
parent
27be769ce5
commit
3090fa556b
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
|
13
gcc/expr.c
13
gcc/expr.c
|
@ -8621,6 +8621,19 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue