* flow.c (elim_reg_cond): Handle a comparison of a subreg.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Apr 2007 21:02:21 +0000 (21:02 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Apr 2007 21:02:21 +0000 (21:02 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124122 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/flow.c

index e744b9f..0826135 100644 (file)
@@ -1,10 +1,15 @@
+2007-04-24  Ian Lance Taylor  <iant@google.com>
+
+       * flow.c (elim_reg_cond): Handle a comparison of a subreg.
+
 2007-04-24  Simon Martin  <simartin@users.sourceforge.net>
 
        PR diagnostic/25923
        * tree-pass.h (TDF_DIAGNOSTIC): New dump control to specify that a
        diagnostic message is being built.
-       * tree-pretty-print.c (dump_generic_node): Only write the formatted text
-       into BUFFER's stream if we are not building a diagnostic message.
+       * tree-pretty-print.c (dump_generic_node): Only write the
+       formatted text into BUFFER's stream if we are not building a
+       diagnostic message.
        * toplev.c (default_tree_printer): Pass TDF_DIAGNOSTIC to
        dump_generic_node.
        * Makefile.in (toplev.o): Depend on tree-pass.h.
index 78c2328..5b0249b 100644 (file)
@@ -3437,7 +3437,13 @@ elim_reg_cond (rtx x, unsigned int regno)
 
   if (COMPARISON_P (x))
     {
-      if (REGNO (XEXP (x, 0)) == regno)
+      rtx reg;
+
+      reg = XEXP (x, 0);
+      if (GET_CODE (reg) == SUBREG)
+       reg = SUBREG_REG (reg);
+      gcc_assert (REG_P (reg));
+      if (REGNO (reg) == regno)
        return const0_rtx;
       return x;
     }