* loop.c (get_condition): Handle sign-extended constants.

From-SVN: r17590
This commit is contained in:
J"orn Rennecke 1998-02-02 00:37:25 +00:00 committed by Jeff Law
parent db771a3c53
commit 460f50dc14
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Mon Feb 2 01:38:39 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* loop.c (get_condition): Handle sign-extended constants.
Mon Feb 2 01:22:46 1998 Hans-Peter Nilsson <hp@axis.se>
* expr.c (emit_push_insn): Add code to use movstrti if present.

View File

@ -7075,15 +7075,17 @@ get_condition (jump, earliest)
code = LT, op1 = GEN_INT (const_val + 1);
break;
/* When cross-compiling, const_val might be sign-extended from
BITS_PER_WORD to HOST_BITS_PER_WIDE_INT */
case GE:
if (const_val
if ((const_val & max_val)
!= (((HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (op0)) - 1))))
code = GT, op1 = GEN_INT (const_val - 1);
break;
case LEU:
if (uconst_val != max_val)
if (uconst_val < max_val)
code = LTU, op1 = GEN_INT (uconst_val + 1);
break;