i386.c (ix86_expand_branch): Treat GE and GEU the same way as LT and LTU when...
authorJakub Jelinek <jakub@redhat.com>
Fri, 25 Aug 2000 12:40:18 +0000 (14:40 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 25 Aug 2000 12:40:18 +0000 (14:40 +0200)
* config/i386/i386.c (ix86_expand_branch): Treat GE and GEU the same
way as LT and LTU when the second operand has 0 in low word.

From-SVN: r35982

gcc/ChangeLog
gcc/config/i386/i386.c

index e4b4d6e92f633e4a01c82c189367d36ba74dfb57..e07ca1c5e755418d64743a931c4a7b37442ac667 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-25  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/i386/i386.c (ix86_expand_branch): Treat GE and GEU the same
+       way as LT and LTU when the second operand has 0 in low word.
+
 2000-08-26  Michael Hayes  <mhayes@cygnus.com>
 
        * basic-block.h (struct loop): Rename `exits' field to
index 4c21a88a4d9194d618547b9ace293b859ea33717..9fa6fabb85b127f05e3211a69e72c644b183d156 100644 (file)
@@ -4977,17 +4977,21 @@ ix86_expand_branch (code, label)
            return;
          }
 
-       /* Otherwise, if we are doing less-than, op1 is a constant and the
-          low word is zero, then we can just examine the high word.  */
+       /* Otherwise, if we are doing less-than or greater-or-equal-than,
+          op1 is a constant and the low word is zero, then we can just
+          examine the high word.  */
 
-       if (GET_CODE (hi[1]) == CONST_INT && lo[1] == const0_rtx
-           && (code == LT || code == LTU))
-         {
-           ix86_compare_op0 = hi[0];
-           ix86_compare_op1 = hi[1];
-           ix86_expand_branch (code, label);
-           return;
-         }
+       if (GET_CODE (hi[1]) == CONST_INT && lo[1] == const0_rtx)
+         switch (code)
+           {
+           case LT: case LTU: case GE: case GEU:
+             ix86_compare_op0 = hi[0];
+             ix86_compare_op1 = hi[1];
+             ix86_expand_branch (code, label);
+             return;
+           default:
+             break;
+           }
 
        /* Otherwise, we need two or three jumps.  */