re PR rtl-optimization/23837 (Wrong code with REG_NO_CONFLICT notes (caused by combine))
authorJ"orn Rennecke <joern.rennecke@st.com>
Fri, 23 Sep 2005 12:05:56 +0000 (12:05 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 23 Sep 2005 12:05:56 +0000 (13:05 +0100)
PR rtl-optimization/23837
*  optabs.c (no_conflict_move_test): Don't set must_stay for a
clobber / clobber match between dest and p->first.

From-SVN: r104562

gcc/ChangeLog
gcc/optabs.c

index df1832996524293f745b6475b9a703204ab6b65d..db68f2ae8ecd9d13cee590cfb7cbd42f70fb9a08 100644 (file)
@@ -3,6 +3,10 @@
        * final.c (insn_default_length, insn_min_length): In !HAVE_ATTR_length
        case, define as macros.
 
+       PR rtl-optimization/23837
+       *  optabs.c (no_conflict_move_test): Don't set must_stay for a
+       clobber / clobber match between dest and p->first.
+
 2005-09-22  Ranjit Mathew  <rmathew@gcc.gnu.org>
 
        * doc/install.texi: Update URL for Jacks.
index bcb11b5432f3fcc724ed29e1c602436294ed8c92..5da604d6e278fe9deda275d11a94cc41b22405da 100644 (file)
@@ -3021,7 +3021,8 @@ no_conflict_move_test (rtx dest, rtx set, void *p0)
     return;
   /* If this insn sets / clobbers a register that feeds one of the insns
      already in the list, this insn has to stay too.  */
-  else if (reg_mentioned_p (dest, PATTERN (p->first))
+  else if (reg_overlap_mentioned_p (dest, PATTERN (p->first))
+          || (CALL_P (p->first) && (find_reg_fusage (p->first, USE, dest)))
           || reg_used_between_p (dest, p->first, p->insn)
           /* Likewise if this insn depends on a register set by a previous
              insn in the list.  */