optabs.c (emit_cmp_and_jump_insns): Be more thorough in canonization.
authorRichard Henderson <rth@cygnus.com>
Thu, 26 Aug 1999 00:59:14 +0000 (17:59 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 26 Aug 1999 00:59:14 +0000 (17:59 -0700)
        * optabs.c (emit_cmp_and_jump_insns): Be more thorough in
        canonization.

From-SVN: r28885

gcc/ChangeLog
gcc/optabs.c

index a15299724acef71edc29b93efacbe9798089de80..f73c4da31a4eb6ad3b8af4a5d68391f3d2e17a8a 100644 (file)
@@ -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.
index dc742627a77e41639ac9315e1de6c26a03e5f2d4..f8409374409011ca3cc8d44c1388396dd182c08f 100644 (file)
@@ -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;