From patchwork Thu Oct 29 16:02:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 55791 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp646691lbr; Thu, 29 Oct 2015 09:02:43 -0700 (PDT) X-Received: by 10.69.11.193 with SMTP id ek1mr2728085pbd.32.1446134563245; Thu, 29 Oct 2015 09:02:43 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f6si3408436pas.137.2015.10.29.09.02.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 09:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-411992-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; spf=pass (google.com: domain of gcc-patches-return-411992-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-411992-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@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=l7cw6CpYNvbEYlLWpbDTD5vdIXfsfVjwb/MZGxpfHSH 0m0t7Fd0xTbs/s86rw71g3CxQ6/oXOG8sAAl+ylHmwXAmx3y+oOztbX1KI8/m38d PYTLujOlHhiyrEVNR0D0kI5gaRE4dFlWzqSPuspPo3jeziEGeKz/dyQh6W4BCx8s = 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=MPCP85LM6W+Iw8e9JtyLplXzpGA=; b=dcDUH2SUDghYTHUXm 3MbOFWBp815WsW3yBTOL8d7to8ak9CLhi9ZFQgoRLeR6IdlKlj1+z2O3NE6f5PPD WrGur6kLmh9VfHPgpHAxtoRsGQkgSAxihFvZaELk6FP14/4G0b7T4NhxA23rzUl4 wZTdFQ/8FsGGW7yu1s3vbH75yk= Received: (qmail 124444 invoked by alias); 29 Oct 2015 16:02:30 -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 124434 invoked by uid 89); 29 Oct 2015 16:02:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Oct 2015 16:02:29 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-30-9G2LPvIUQi25zVTCrLZ-Ew-1; Thu, 29 Oct 2015 16:02:23 +0000 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 29 Oct 2015 16:02:23 +0000 Message-ID: <5632430F.7080402@arm.com> Date: Thu, 29 Oct 2015 16:02:23 +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: Ramana Radhakrishnan , Richard Earnshaw Subject: [PATCH][ARM] Fix checking RTL error in cortex_a9_sched_adjust_cost X-MC-Unique: 9G2LPvIUQi25zVTCrLZ-Ew-1 X-IsSubscribed: yes Hi all, An arm-none-eabi build with RTL checking and --with-cpu=cortex-a9 fails because cortex_a9_sched_adjust_cost tries to access the SET_DEST of a PARALLEL. The correct thing to do is to call single_set on dep, which will return a simple SET that we can take the SET_DEST of or NULL if there's more than one SET. This patch does that. The arm-none-eabi build passes. Bootstrapped and tested on arm-none-linux-gnueabihf. Ok for trunk? Thanks, Kyrill 2015-10-29 Kyrylo Tkachov * config/arm/arm.c (cortex_a9_sched_adjust_cost): Use reg_set_p to check for dependencies. commit bef3ba20485085d702b9a6c8683683db49b547f0 Author: Kyrylo Tkachov Date: Tue Oct 27 18:09:29 2015 +0000 [ARM] Fix checking RTL error in cortex_a9_sched_adjust_cost diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 08a852d..452b23d 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -11649,9 +11649,7 @@ cortex_a9_sched_adjust_cost (rtx_insn *insn, rtx link, rtx_insn *dep, int * cost case. However this gets modeled as an true dependency and hence all these checks. */ if (REG_P (SET_DEST (PATTERN (insn))) - && REG_P (SET_DEST (PATTERN (dep))) - && reg_overlap_mentioned_p (SET_DEST (PATTERN (insn)), - SET_DEST (PATTERN (dep)))) + && reg_set_p (SET_DEST (PATTERN (insn)), dep)) { /* FMACS is a special case where the dependent instruction can be issued 3 cycles before