OSDN Git Service

* loop.c (get_condition): Handle sign-extended constants.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Feb 1998 00:37:25 +0000 (00:37 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Feb 1998 00:37:25 +0000 (00:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17590 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/loop.c

index 446844c..890853e 100644 (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.
index 0fa3b4f..6aa7485 100644 (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;