function.c (emit_use_return_register_into_block): On cc0 targets, do not emit the...
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 25 Mar 2013 11:24:12 +0000 (11:24 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 25 Mar 2013 11:24:12 +0000 (11:24 +0000)
* function.c (emit_use_return_register_into_block): On cc0 targets,
do not emit the sequence between cc0 setter and user.

From-SVN: r197036

gcc/ChangeLog
gcc/function.c

index c782c04..072efd7 100644 (file)
@@ -1,7 +1,12 @@
+2013-03-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * function.c (emit_use_return_register_into_block): On cc0 targets,
+       do not emit the sequence between cc0 setter and user.
+
 2013-03-25  Kai Tietz  <ktietz@redhat.com>
 
-        * config/i386/predicates.md (local_symbolic_operand): Interpret
-        dll-imported symbols as none-local.
+       * config/i386/predicates.md (local_symbolic_operand): Interpret
+       dll-imported symbols as none-local.
 
 2013-03-25  Richard Biener  <rguenther@suse.de>
 
index 5419b88..cd9cb85 100644 (file)
@@ -5598,12 +5598,17 @@ prepare_shrink_wrap (basic_block entry_block)
 static void
 emit_use_return_register_into_block (basic_block bb)
 {
-  rtx seq;
+  rtx seq, insn;
   start_sequence ();
   use_return_register ();
   seq = get_insns ();
   end_sequence ();
-  emit_insn_before (seq, BB_END (bb));
+  insn = BB_END (bb);
+#ifdef HAVE_cc0
+  if (reg_mentioned_p (cc0_rtx, PATTERN (insn)))
+    insn = prev_cc0_setter (insn);
+#endif
+  emit_insn_before (seq, insn);
 }