From patchwork Wed Mar 18 10:19:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 45926 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E18DC2153C for ; Wed, 18 Mar 2015 10:20:13 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf6500465lbv.0 for ; Wed, 18 Mar 2015 03:20:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:date:message-id:subject:from:to:cc :content-type:x-original-sender:x-original-authentication-results; bh=dtUWWlWACYCnRVTo6W3yamYqxGsZD6AceBrmXhsxL1E=; b=YeV/Yba1ZkK5jAZeD5Vu+tse4xUJ0/u8m9jyDm0M6WGSTsuF9Y4jS+bycpdFzTcs5h CN/ZDa3Jae77m31iboTuG+DMqcJxHNMwXycpb9BU/kCIuClI7XwCox7allp+TMDhcRe+ OWzfDJZRJX8T6Cl9wHVwer4Uyd8S9hlBuiA5e8oHYolZQV2/hY9bFykPtAjlo45SvIX+ t9sD4Ljvh1Gdxxy76YMgSUtm9uPIO5mp7FaN7vQqKj+lhsRILYsb5+oLA6+7LFLdWrVr th8n/iq4uNQtq1z4x/YHGY9/hzii9B9iGAJ/UTisgwSu8HyJm8J7KRiJSlZcEXB3Qf5V CXvA== X-Gm-Message-State: ALoCoQlJ1lba5z/OqQ7lEN6KqfFqQf8ffE7kVJqse6f591zGJi6m6A9Sz+Eubzt474DWu71xYbih X-Received: by 10.152.45.7 with SMTP id i7mr10894380lam.9.1426674012824; Wed, 18 Mar 2015 03:20:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.199 with SMTP id le7ls151828lab.89.gmail; Wed, 18 Mar 2015 03:20:12 -0700 (PDT) X-Received: by 10.152.29.68 with SMTP id i4mr14100621lah.19.1426674012538; Wed, 18 Mar 2015 03:20:12 -0700 (PDT) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com. [2a00:1450:4010:c04::236]) by mx.google.com with ESMTPS id b6si12552144lbd.173.2015.03.18.03.20.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 03:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) client-ip=2a00:1450:4010:c04::236; Received: by lbblx11 with SMTP id lx11so3834862lbb.3 for ; Wed, 18 Mar 2015 03:20:12 -0700 (PDT) X-Received: by 10.152.26.201 with SMTP id n9mr62966663lag.29.1426674012369; Wed, 18 Mar 2015 03:20:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1057314lbj; Wed, 18 Mar 2015 03:20:11 -0700 (PDT) X-Received: by 10.70.102.236 with SMTP id fr12mr89560458pdb.79.1426674010383; Wed, 18 Mar 2015 03:20:10 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id pq9si35097595pdb.223.2015.03.18.03.20.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 03:20:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-393667-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 14162 invoked by alias); 18 Mar 2015 10:19:56 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 14152 invoked by uid 89); 18 Mar 2015 10:19:56 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f170.google.com Received: from mail-ob0-f170.google.com (HELO mail-ob0-f170.google.com) (209.85.214.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 Mar 2015 10:19:55 +0000 Received: by obcxo2 with SMTP id xo2so28310607obc.0 for ; Wed, 18 Mar 2015 03:19:53 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.108.84 with SMTP id h81mr13383867oic.90.1426673992961; Wed, 18 Mar 2015 03:19:52 -0700 (PDT) Received: by 10.202.221.214 with HTTP; Wed, 18 Mar 2015 03:19:52 -0700 (PDT) Date: Wed, 18 Mar 2015 11:19:52 +0100 Message-ID: Subject: [PATCH, ARM, PR64208] LRA ICE Fix From: Yvan Roux To: "gcc-patches@gcc.gnu.org" Cc: Ramana Radhakrishnan , Richard Earnshaw , Vladimir Makarov X-IsSubscribed: yes X-Original-Sender: yvan.roux@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi, This is a fix for PR64208 where LRA loops when dealing with iwmmxt_arm_movdi insn. As explain in the PR, the issue was introduced on trunk and 4.9 branch by fix of PR rtl-optimization/60969 and then workaround by r211798 (-fuse-caller-save enable for ARM). The changes in IRA cost made by PR60969, changed the register class of this insn output from GENERAL_REGS to IWMMXT_REGS, and the redundancies in the insn pattern alternatives description force LRA to reload the pseudo, which generates the same iwmmxt_arm_movdi insn, which can't be resolved, and so on ... Removing the redundancies fixes the issue, as LRA find that alternative 8 (Uy => y) matches. This issue is present in 4.9 branch, but latent on trunk (the clobbering of IP and CC information added during -fuse-caller-save patch changed the register allocation). Cross compiled and regression tested on ARM targets (but not on an IWMMXT one), is it ok for trunk and 4.9 branch ? Rq: I think that adding IP and CC clobbers to CALL_INSN_FUNCTION_USAGE, as specified by AAPCS, in 4.9 branch is something we need too, I've a patch for that if you agree on that. Thanks, Yvan 2105-03-17 Yvan Roux PR target/64208 * config/arm/iwmmxt.md ("*iwmmxt_arm_movdi"): Cleanup redundant alternatives. diff --git a/gcc/config/arm/iwmmxt.md b/gcc/config/arm/iwmmxt.md index fda3c2c..d1a60ff 100644 --- a/gcc/config/arm/iwmmxt.md +++ b/gcc/config/arm/iwmmxt.md @@ -107,8 +107,8 @@ ) (define_insn "*iwmmxt_arm_movdi" - [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r, r, r, r, m,y,y,yr,y,yrUy,*w, r,*w,*w, *Uv") - (match_operand:DI 1 "di_operand" "rDa,Db,Dc,mi,r,y,yr,y,yrUy,y, r,*w,*w,*Uvi,*w"))] + [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r, r, r, r, m,y,y,r, y,Uy,*w, r,*w,*w, *Uv") + (match_operand:DI 1 "di_operand" "rDa,Db,Dc,mi,r,y,r,y,Uy,y, r,*w,*w,*Uvi,*w"))] "TARGET_REALLY_IWMMXT && ( register_operand (operands[0], DImode) || register_operand (operands[1], DImode))"