combine.c (make_compound_operation): Swap operands of commutative operation if necessary before returning.
* combine.c (make_compound_operation): Swap operands of commutative operation if necessary before returning. From-SVN: r107219
This commit is contained in:
parent
0ed9a3e314
commit
756191b7c5
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-19 Joseph S. Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* combine.c (make_compound_operation): Swap operands of
|
||||||
|
commutative operation if necessary before returning.
|
||||||
|
|
||||||
2005-11-19 Richard Guenther <rguenther@suse.de>
|
2005-11-19 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR middle-end/23294
|
PR middle-end/23294
|
||||||
|
|
|
@ -6914,6 +6914,16 @@ make_compound_operation (rtx x, enum rtx_code in_code)
|
||||||
SUBST (XEXP (x, i), new);
|
SUBST (XEXP (x, i), new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If this is a commutative operation, the changes to the operands
|
||||||
|
may have made it noncanonical. */
|
||||||
|
if (COMMUTATIVE_ARITH_P (x)
|
||||||
|
&& swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
|
||||||
|
{
|
||||||
|
tem = XEXP (x, 0);
|
||||||
|
SUBST (XEXP (x, 0), XEXP (x, 1));
|
||||||
|
SUBST (XEXP (x, 1), tem);
|
||||||
|
}
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue