Commit c715abdd by Roger Sayle Committed by Roger Sayle

cse.c (fold_rtx): Use swap_commutative_operands_p to determine whether to…

cse.c (fold_rtx): Use swap_commutative_operands_p to determine whether to reorder the operands of...


	* cse.c (fold_rtx): Use swap_commutative_operands_p to determine
	whether to reorder the operands of a commutative binary operator.

From-SVN: r69534
parent 3e4093b6
2003-07-17 Roger Sayle <roger@eyesopen.com>
* cse.c (fold_rtx): Use swap_commutative_operands_p to determine
whether to reorder the operands of a commutative binary operator.
2003-07-17 Roger Sayle <roger@eyesopen.com>
* fold-const.c (const_binop): Avoid performing the FP operation at
compile-time, if either operand is NaN and we honor signaling NaNs,
or if we're dividing by zero and either flag_trapping_math is set
......
......@@ -3783,10 +3783,11 @@ fold_rtx (rtx x, rtx insn)
|| code == LTGT || code == UNEQ || code == ORDERED
|| code == UNORDERED)
{
if (must_swap || (const_arg0
&& (const_arg1 == 0
|| (GET_CODE (const_arg0) == CONST_INT
&& GET_CODE (const_arg1) != CONST_INT))))
if (must_swap
|| swap_commutative_operands_p (const_arg0 ? const_arg0
: XEXP (x, 0),
const_arg1 ? const_arg1
: XEXP (x, 1)))
{
rtx tem = XEXP (x, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment