From patchwork Thu Nov 7 11:48:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 289304 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DC6862C007B for ; Thu, 7 Nov 2013 22:49:23 +1100 (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=UTNf+ubjp4GalpA8Ihr/Zr3G+PbB3g8fXkkyQ5bkOuxHXt FFO7AeL+LuInEy1MxH3Xt/OM7YEK+VWU0gxbhlCv8UIkIvBUbddisKNqgqMdMx2W 8IGJNjlYjudugeOXqrKX4TRxAJxZ8S96d9vXYv47EA4YgKjOtHLPwUyyHZ0tY= 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=QGjnnMVpoBKsM3GFyYQpk49bz0s=; b=FsKGZEvnGc4Xrf8kVjbD QCgKM7QHgg5JyUhypj1uc37VwnhxvfMrqDx0q7F9SqrxJA5mgmHfeKPYejUVq2TE ZP/tnUtM5bBpVAl9lKPltasxj40Pe561FzonYCGCoxCwTE8WiAaI0k6zbY6w/qzN mjqYXjP8G7lLOmQiWeaLOjE= Received: (qmail 25578 invoked by alias); 7 Nov 2013 11:49:11 -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 25568 invoked by uid 89); 7 Nov 2013 11:49:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPAM_SUBJECT, SPF_PASS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: service87.mimecast.com Received: from Unknown (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Nov 2013 11:49:09 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 07 Nov 2013 11:49:01 +0000 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 7 Nov 2013 11:49:00 +0000 Message-ID: <527B7E2B.5040605@arm.com> Date: Thu, 07 Nov 2013 11:48:59 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH][AArch64][committed] Add comment on why plus_constant is not used in aarch64_legitimize_reload_address X-MC-Unique: 113110711490103001 X-IsSubscribed: yes Hi all, I've committed this patch as obvious. It adds a comment in aarch64_legitimize_reload_address explaining that we need the RTL structure to be preserved before push_reload and using plus_constant would fold that, causing ICEs. Thanks, Kyrill [gcc/] 2013-11-07 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_legitimize_reload_address): Explain why plus_constant is not used. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index ee2cb4c..3fe70c1 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4007,7 +4007,11 @@ aarch64_legitimize_reload_address (rtx *x_p, cst = force_const_mem (xmode, cst); /* Reload high part into base reg, leaving the low part - in the mem instruction. */ + in the mem instruction. + Note that replacing this gen_rtx_PLUS with plus_constant is + wrong in this case because we rely on the + (plus (plus reg c1) c2) structure being preserved so that + XEXP (*p, 0) in push_reload below uses the correct term. */ x = gen_rtx_PLUS (xmode, gen_rtx_PLUS (xmode, XEXP (x, 0), cst), GEN_INT (low));