public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix PR47612
@ 2011-04-12 20:33 Bernd Schmidt
  2011-04-12 23:45 ` Michael Matz
  0 siblings, 1 reply; 4+ messages in thread
From: Bernd Schmidt @ 2011-04-12 20:33 UTC (permalink / raw)
  To: GCC Patches; +Cc: joel

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

This fixes a problem on cc0 machines where we split a sequence of insns
at a point where we shouldn't - between a cc0 setter and a cc0 user.

The fix is simple enough; just make sure not to pick a cc0 setter as the
end of such a sequence. The patch below was regression tested on
m68k-rtems4.11 by Joel Sherrill; I'll commit it as obvious in a few days
unless someone tells me it isn't.


Bernd

[-- Attachment #2: dfp2.diff --]
[-- Type: text/plain, Size: 939 bytes --]

	* df-problems.c (can_move_insns_across): Don't pick a cc0 setter
	as the last insn of the sequence to be moved.

Index: df-problems.c
===================================================================
--- df-problems.c	(revision 172094)
+++ df-problems.c	(working copy)
@@ -4001,7 +4001,10 @@ can_move_insns_across (rtx from, rtx to,
 	  if (bitmap_intersect_p (merge_set, test_use)
 	      || bitmap_intersect_p (merge_use, test_set))
 	    break;
-	  max_to = insn;
+#ifdef HAVE_cc0
+	  if (!sets_cc0_p (insn))
+#endif
+	    max_to = insn;
 	}
       next = NEXT_INSN (insn);
       if (insn == to)
@@ -4038,7 +4041,11 @@ can_move_insns_across (rtx from, rtx to,
     {
       if (NONDEBUG_INSN_P (insn))
 	{
-	  if (!bitmap_intersect_p (test_set, local_merge_live))
+	  if (!bitmap_intersect_p (test_set, local_merge_live)
+#ifdef HAVE_cc0
+	      && !sets_cc0_p (insn)
+#endif
+	      )
 	    {
 	      max_to = insn;
 	      break;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-14 12:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 20:33 Fix PR47612 Bernd Schmidt
2011-04-12 23:45 ` Michael Matz
2011-04-12 23:53   ` Bernd Schmidt
2011-04-14 12:38     ` Michael Matz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).