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: r50433
This commit is contained in:
Richard Earnshaw 2002-03-08 10:55:56 +00:00 committed by Richard Earnshaw
parent f78737c9e0
commit 61e751e3dc
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-03-08 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 Ulrich Weigand <uweigand@de.ibm.com>
* genextract.c (walk_rtx): Recurse into MATCH_PAR_DUP.

View File

@ -10885,6 +10885,11 @@ simplify_comparison (code, pop0, pop1)
|| (floor_log2 (const_op) + INTVAL (XEXP (op0, 1))
< 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));
op1 = GEN_INT (const_op);
op0 = XEXP (op0, 0);