Don't combine calls into i3, it wouldn't be changed into a CALL_INSN.
authorBernd Schmidt <bernds@codesourcery.com>
Thu, 6 Nov 2014 17:19:57 +0000 (17:19 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 6 Nov 2014 17:19:57 +0000 (17:19 +0000)
* combine.c (try_combine): Don't allow a call as one of the source
insns.

From-SVN: r217197

gcc/ChangeLog
gcc/combine.c

index 1121f3e856414fbec14e8801727f18f80d541438..4e9a739f0ec2ad9422c5dbbaaa253d53830f73ac 100644 (file)
@@ -1,5 +1,8 @@
 2014-11-06  Bernd Schmidt  <bernds@codesourcery.com>
 
+       * combine.c (try_combine): Don't allow a call as one of the source
+       insns.
+
        * target.def (decl_end): New hook.
        * varasm.c (assemble_variable_contents, assemble_constant_contents):
        Use it.
index e240cfb9449c4219b56cd4520a179571c822f940..6a7d16bf27ef89edd571e1d8f6dfb6eee934e09d 100644 (file)
@@ -2553,7 +2553,10 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
 
   /* Exit early if one of the insns involved can't be used for
      combinations.  */
-  if (cant_combine_insn_p (i3)
+  if (CALL_P (i2)
+      || (i1 && CALL_P (i1))
+      || (i0 && CALL_P (i0))
+      || cant_combine_insn_p (i3)
       || cant_combine_insn_p (i2)
       || (i1 && cant_combine_insn_p (i1))
       || (i0 && cant_combine_insn_p (i0))