From patchwork Thu Sep 11 13:24:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 388240 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E8CFC1400A0 for ; Thu, 11 Sep 2014 23:26:00 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=mYYI6s/6MHNDbwulBP6/MbMvLPtJuGt5z5KApwpsEmNPPY lTOP4kJXDMZdcwg6XFeVQxYBMcW8hvj04DPlhkuGPpVxJMYQixKMmddJzKBGNwDL AwlxaI6ditQPbnTs2xJ+M3kkqB+hZUNvNz8pB8E/NgzOnGr+uJhgUsdp/Cdi4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=tvZ87Bz/ADhIbaeOCwky+U0OIdQ=; b=UMxD8KZ4mQ2rvhPzMQ+r J6hqDDQ3EFfK9YG0kyQyLp9xUxkdHTA762DGZS12FMLdlc4Z7tOiBMVZXoBWd/br G350htQ1h3mCcOrMzOrfBwaK4MNxjivpHjTxMBBX3Xebf8wjfITuBkZgU/djI8Yo yRc/2+rX9LcLX+O8SS/lLf0= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 15:24:54 +0200 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] 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 * 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))