From patchwork Thu Jan 12 17:38:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 91199 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1733223qgi; Thu, 12 Jan 2017 09:39:03 -0800 (PST) X-Received: by 10.98.77.67 with SMTP id a64mr17888606pfb.124.1484242743543; Thu, 12 Jan 2017 09:39:03 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id c186si9887841pga.7.2017.01.12.09.39.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 09:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445988-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445988-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445988-patch=linaro.org@gcc.gnu.org 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:cc:subject:content-type; q=dns; s=default; b=BtVAcZmePHNmhEnNmoDr4CNURMq6AJOQEuK3DhILO1I pddrWKTKbtizCffgSq95CmnCsoQFMLVyx2UpT/7QkyBkBFa/ToChc2wOdZU85b+7 wl1Pksx+rhvS5Uxi6piq2ljAMk0sDDLTuVsLMudNFiIxeaYpZaPij1GvuHVaTukY = 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:cc:subject:content-type; s=default; bh=7ZFcuhku676KKX4SX4lgllxDXaU=; b=UKrAtr1bJWCVHwIc3 x7PMjx0yPVYcfvrnMq2ib3sV2AN5cAg4vmlu3Ah6LVVwJFn2iP0/+1lD2eb7+TQD D5/RY4q2S0xMfHoAsbfI5n/79aPKntY6J2QX9HVHGwJCSJ8E1FEoO9X84e47DeoA mjm9uojYPJM2OSCAw5PaMaID2I= Received: (qmail 100941 invoked by alias); 12 Jan 2017 17:38:45 -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 100931 invoked by uid 89); 12 Jan 2017 17:38:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=interest X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jan 2017 17:38:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DCE14AD7; Thu, 12 Jan 2017 09:38:32 -0800 (PST) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A6DA3F24D; Thu, 12 Jan 2017 09:38:32 -0800 (PST) Message-ID: <5877BF16.4090004@foss.arm.com> Date: Thu, 12 Jan 2017 17:38:30 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Nathan Sidwell , hans-peter.nilsson@axis.com Subject: [PATCH][GCC 5] Fix build issue with NO_FUNCTION_CSE Hi all, This patch fixes the build issue on x86_64 (and other targets that define NO_FUNCTION_CSE but not a particular value) on the GCC 5 branch. Tested on x86_64. Committing to the branch in the interest of fixing the build. Thanks, Kyrill 2016-01-12 Kyrylo Tkachov * postreload.c (reload_cse_simplify): Check for NO_FUNCTION_CSE definition instead of using it directly. diff --git a/gcc/postreload.c b/gcc/postreload.c index ba6591d..fc0499a 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -122,8 +122,10 @@ reload_cse_simplify (rtx_insn *insn, rtx testreg) /* If NO_FUNCTION_CSE has been set by the target, then we should not try to cse function calls. */ - if (NO_FUNCTION_CSE && CALL_P (insn)) +#ifdef NO_FUNCTION_CSE + if (CALL_P (insn)) return false; +#endif if (GET_CODE (body) == SET) {