Commit 145d3bf2 by Richard Earnshaw Committed by Richard Earnshaw

combine.c (simplify_comparison): If simplifying a logical shift right and compare with constant...

* combine.c (simplify_comparison): If simplifying a logical shift
right and compare with constant, force the comparison to unsigned.

From-SVN: r50400
parent 50cb1e20
2002-03-07 Richard Earnshaw <rearnsha@arm.com>
* combine.c (simplify_comparison): If simplifying a logical shift
right and compare with constant, force the comparison to unsigned.
2002-03-07 Aldy Hernandez <aldyh@redhat.com> 2002-03-07 Aldy Hernandez <aldyh@redhat.com>
* doc/invoke.texi: Add documentation for -mabi=no-altivec. * doc/invoke.texi: Add documentation for -mabi=no-altivec.
......
...@@ -10885,6 +10885,11 @@ simplify_comparison (code, pop0, pop1) ...@@ -10885,6 +10885,11 @@ simplify_comparison (code, pop0, pop1)
|| (floor_log2 (const_op) + INTVAL (XEXP (op0, 1)) || (floor_log2 (const_op) + INTVAL (XEXP (op0, 1))
< mode_width))) < mode_width)))
{ {
/* If the shift was logical, then we must make the condition
unsigned. */
if (GET_CODE (op0) == LSHIFTRT)
code = unsigned_condition (code);
const_op <<= INTVAL (XEXP (op0, 1)); const_op <<= INTVAL (XEXP (op0, 1));
op1 = GEN_INT (const_op); op1 = GEN_INT (const_op);
op0 = XEXP (op0, 0); op0 = XEXP (op0, 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