aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-08-25 14:40:18 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-08-25 14:40:18 +0200
commit1f9124e42e485a2afe439fbd6966a5263783186c (patch)
tree4019c2c5f13f052c80b67ec62cb6bda31a0b7332
parent22a4158c6afcab145ec63f3bd81907a19754b04f (diff)
downloadgcc-1f9124e42e485a2afe439fbd6966a5263783186c.zip
gcc-1f9124e42e485a2afe439fbd6966a5263783186c.tar.gz
gcc-1f9124e42e485a2afe439fbd6966a5263783186c.tar.bz2
i386.c (ix86_expand_branch): Treat GE and GEU the same way as LT and LTU when...
* 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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c24
2 files changed, 19 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e4b4d6e..e07ca1c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 4c21a88..9fa6fab 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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. */