Commit d40bb52a by Richard Stallman

(gen_int_relational): For test with constant result,

copy const0_rtx or const_true_rtx to result register instead
of allocating a new pseudo-register.

From-SVN: r4808
parent de35ae1f
...@@ -1660,10 +1660,13 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert) ...@@ -1660,10 +1660,13 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert)
? (unsigned HOST_WIDE_INT) new > INTVAL (cmp1) ? (unsigned HOST_WIDE_INT) new > INTVAL (cmp1)
: new > INTVAL (cmp1)) : new > INTVAL (cmp1))
!= (p_info->const_add > 0)) != (p_info->const_add > 0))
/* 1 is the right value in the LE and LEU case. {
In the GT and GTU case, *p_invert is already set, /* This test is always true, but if INVERT is true then
so this is effectively 0. */ the result of the test needs to be inverted so 0 should
return force_reg (SImode, const1_rtx); be returned instead. */
emit_move_insn (result, invert ? const0_rtx : const_true_rtx);
return result;
}
else else
cmp1 = GEN_INT (new); cmp1 = GEN_INT (new);
} }
......
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