Commit bf743ac5 by Richard Kenner

(compare_from_rtx): Only swap operand if first is a constant and

second is not.

From-SVN: r3370
parent c81fe25d
...@@ -7116,9 +7116,11 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align) ...@@ -7116,9 +7116,11 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align)
{ {
rtx tem; rtx tem;
/* If one operand is constant, make it the second one. */ /* If one operand is constant, make it the second one. Only do this
if the other operand is not constant as well. */
if (GET_CODE (op0) == CONST_INT || GET_CODE (op0) == CONST_DOUBLE) if ((CONSTANT_P (op0) && ! CONSTANT_P (op1))
|| (GET_CODE (op0) == CONST_INT && GET_CODE (op1) != CONST_INT))
{ {
tem = op0; tem = op0;
op0 = op1; op0 = op1;
......
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