From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26964 invoked by alias); 11 Sep 2014 13:25:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26942 invoked by uid 89); 11 Sep 2014 13:25:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,T_FROM_12LTRDOM autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Sep 2014 13:25:51 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XS4Ne-0006jW-IZ from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Thu, 11 Sep 2014 06:25:46 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-04.mgc.mentorg.com (137.202.0.110) with Microsoft SMTP Server id 14.3.181.6; Thu, 11 Sep 2014 14:25:45 +0100 Message-ID: <5411A2A6.1030303@codesourcery.com> Date: Thu, 11 Sep 2014 13:25:00 -0000 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: GCC Patches Subject: ptx preliminary rtl patches [1/4] Content-Type: multipart/mixed; boundary="------------050701030400080409010404" X-SW-Source: 2014-09/txt/msg00921.txt.bz2 --------------050701030400080409010404 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 298 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 --------------050701030400080409010404 Content-Type: text/x-patch; name="ptx-rtl1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ptx-rtl1.diff" Content-length: 647 * 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)) --------------050701030400080409010404--