public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* ptx preliminary rtl patches [1/4]
@ 2014-09-11 13:25 Bernd Schmidt
  2014-10-29 23:58 ` Bernd Schmidt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bernd Schmidt @ 2014-09-11 13:25 UTC (permalink / raw)
  To: GCC Patches

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

The nvptx backend is somewhat unusual in that call insns set a pseudo. 
The combiner is surprised by this and allows combining them into other 
insns, which remain as INSN rather than CALL_INSN. Aborts ensue.

Bootstrapped and tested on x86_64-linux, together with the other 
patches.  Ok?


Bernd

[-- Attachment #2: ptx-rtl1.diff --]
[-- Type: text/x-patch, Size: 647 bytes --]

    	* combine.c (try_combine): Don't allow a call as one of the source
    	insns.

diff --git a/gcc/combine.c b/gcc/combine.c
index 0ec7f85..fe95b41 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2543,7 +2543,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))

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

end of thread, other threads:[~2014-10-31 17:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 13:25 ptx preliminary rtl patches [1/4] Bernd Schmidt
2014-10-29 23:58 ` Bernd Schmidt
2014-10-30  3:47 ` Jeff Law
2014-10-30 18:38 ` Segher Boessenkool
2014-10-30 23:38   ` Jeff Law
2014-10-31 17:27   ` Bernd Schmidt

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).