+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>
PR middle-end/23294
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;
}
\f