aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-08-26 00:58:42 +0000
committerRichard Henderson <rth@cygnus.com>1999-08-26 00:58:42 +0000
commitec75381c3783c22889b7a5611c1936b7666626e6 (patch)
tree707ed26f6e0c6672f3e1ccba50590358a8743479
parentb234bf259fa969fe20a6554599215517d0e4bb16 (diff)
* optabs.c (emit_cmp_and_jump_insns): Be more thorough in
canonization. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/new_ia32_branch@28884 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/optabs.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c994ed21eff..6b0d4b9cc84 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 25 17:56:59 1999 Richard Henderson <rth@cygnus.com>
+
+ * optabs.c (emit_cmp_and_jump_insns): Be more thorough in
+ canonization.
+
Wed Aug 25 15:35:55 1999 Richard Henderson <rth@cygnus.com>
* m88k.h (VERSION_INFO2): Kill.
diff --git a/gcc/optabs.c b/gcc/optabs.c
index dc742627a77..f8409374409 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3299,7 +3299,8 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
rtx op0;
rtx op1;
- if (CONSTANT_P (x))
+ if ((CONSTANT_P (x) && ! CONSTANT_P (y))
+ || (GET_CODE (x) == CONST_INT && GET_CODE (y) != CONST_INT))
{
/* Swap operands and condition to ensure canonical RTL. */
op0 = y;