]> gcc.gnu.org Git - gcc.git/commitdiff
combine.c (combine_instructions): Don't use reg_equal/equiv results if the mode doesn...
authorRichard Henderson <rth@redhat.com>
Wed, 3 Aug 2005 04:32:00 +0000 (21:32 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 3 Aug 2005 04:32:00 +0000 (21:32 -0700)
        * combine.c (combine_instructions): Don't use reg_equal/equiv
        results if the mode doesn't match.

From-SVN: r102679

gcc/ChangeLog
gcc/combine.c

index 97a45980ab6b51bf5e8dc99355746a25ed55295d..f15d09e9218873dd42ff080f8c95ea25a83e2abe 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-02  Richard Henderson  <rth@redhat.com>
+
+       * combine.c (combine_instructions): Don't use reg_equal/equiv
+       results if the mode doesn't match.
+
 2005-08-02  Mark Mitchell  <mark@codesourcery.com>
 
        * config/i386/t-mingw32 (NATIVE_SYSTEM_HEADER_DIR): Set it.
index d8d3baf982af5130d8a806ccfa747dd4cde3bba5..bbd6c0953c3aec1d424adfe9a2bdc0ea9124411c 100644 (file)
@@ -860,16 +860,19 @@ combine_instructions (rtx f, unsigned int nregs)
                  rtx temp = XEXP (links, 0);
                  if ((set = single_set (temp)) != 0
                      && (note = find_reg_equal_equiv_note (temp)) != 0
-                     && GET_CODE (XEXP (note, 0)) != EXPR_LIST
+                     && (note = XEXP (note, 0), GET_CODE (note)) != EXPR_LIST
                      /* Avoid using a register that may already been marked
                         dead by an earlier instruction.  */
-                     && ! unmentioned_reg_p (XEXP (note, 0), SET_SRC (set)))
+                     && ! unmentioned_reg_p (note, SET_SRC (set))
+                     && (GET_MODE (note) == VOIDmode
+                         ? SCALAR_INT_MODE_P (GET_MODE (SET_DEST (set)))
+                         : GET_MODE (SET_DEST (set)) == GET_MODE (note)))
                    {
                      /* Temporarily replace the set's source with the
                         contents of the REG_EQUAL note.  The insn will
                         be deleted or recognized by try_combine.  */
                      rtx orig = SET_SRC (set);
-                     SET_SRC (set) = XEXP (note, 0);
+                     SET_SRC (set) = note;
                      next = try_combine (insn, temp, NULL_RTX,
                                          &new_direct_jump_p);
                      if (next)
This page took 0.077092 seconds and 5 git commands to generate.