combine.c (simplify_set): match the mode of the constant 0 with the tested operand...
authorRoman Zippel <zippel@linux-m68k.org>
Thu, 15 Jul 2004 21:16:21 +0000 (21:16 +0000)
committerMatthias Klose <doko@gcc.gnu.org>
Thu, 15 Jul 2004 21:16:21 +0000 (21:16 +0000)
2004-07-15  Roman Zippel  <zippel@linux-m68k.org>

        * combine.c (simplify_set): match the mode of the constant 0 with
        the tested operand to match the compare behaviour and the
        simplify_relational_operation() expectation.

From-SVN: r84779

gcc/ChangeLog
gcc/combine.c

index 3dd6fd36764921ca63d53a92301d18c16db40ff5..0db81d0e9f8f2bf26a0b2dc46a31b6bd76b50d31 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-15  Roman Zippel  <zippel@linux-m68k.org>
+
+       * combine.c (simplify_set): match the mode of the constant 0 with 
+       the tested operand to match the compare behaviour and the 
+       simplify_relational_operation() expectation.
+
 2004-07-15  Aldy Hernandez  <aldyh@redhat.com>
 
         * config/rs6000/rs6000.md ("bunordered"): Disable for e500.
index 1bdceb5ef9c500a3b0e2410b847f93e3b3e3d574..0b4b4ca5a648383bc720ddde74d2648a2fcbe490 100644 (file)
@@ -5107,7 +5107,7 @@ simplify_set (rtx x)
       if (GET_CODE (src) == COMPARE)
        op0 = XEXP (src, 0), op1 = XEXP (src, 1);
       else
-       op0 = src, op1 = const0_rtx;
+       op0 = src, op1 = CONST0_RTX (GET_MODE (src));
 
       tmp = simplify_relational_operation (old_code, compare_mode, VOIDmode,
                                           op0, op1);