From patchwork Tue Jun 7 10:50:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renlin Li X-Patchwork-Id: 631454 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 3rP7dS1RRdz9t3s for ; Tue, 7 Jun 2016 20:50:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=A1FWhc0/; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=sKlpk/NuKB84rhID8 OchoDY6G3bFTUo+SksGWJn8vMQBiEOkJtZ3liFdb+aZcsnQAkU++qNehDZ/m24ew zCz6thDqZvS/KKy7vMXaDTHxITdvOMOeEJ9c5eNNUnCr8V4+/QykBR8kSghk1ejM LUiYQ44p34VQimtJyQEU2CFBYw= 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 :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=cZYs17YZ8m9Hx/UFV+jyXYF fayk=; b=A1FWhc0/X5Npyu1qK40WCzxOPQkKWryBktTTsgbsSqN+4OgUAKl+9hx ealUras34N0nBdeesYZ48xHgMQYBWCD9H3A0DpkrAPs7gOq5p3UJBOGtV+AMFq9v cDiZL45zAIDBDgLN4IafHenD0p0pst/kjIlim9jfAsQXSWMOVlKI= Received: (qmail 65899 invoked by alias); 7 Jun 2016 10:50:26 -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 65872 invoked by uid 89); 7 Jun 2016 10:50:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=is!, Hx-languages-length:1879, aarch64-linux 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; Tue, 07 Jun 2016 10:50:15 +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 B928C34; Tue, 7 Jun 2016 03:50:47 -0700 (PDT) Received: from [10.2.207.43] (e104453-lin.cambridge.arm.com [10.2.207.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C94073F213; Tue, 7 Jun 2016 03:50:12 -0700 (PDT) Subject: Re: [PATCH, aarch64] Fix 70048 To: Richard Henderson , gcc-patches@gcc.gnu.org References: <56E9CF47.5040806@redhat.com> Cc: James Greenhalgh From: Renlin Li Message-ID: <5756A6E3.3090105@foss.arm.com> Date: Tue, 7 Jun 2016 11:50:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56E9CF47.5040806@redhat.com> X-IsSubscribed: yes Hi Richard, On 16/03/16 21:25, Richard Henderson wrote: > This fixes only the regression described in the PR. > > There was quite a bit of follow-up that points to new work that ought to > be done during the gcc7 cycle, but isn't really appropriate now. > > Tested on aarch64-linux; committed as reviewed in the PR. > > > r~ > @@ -4953,74 +4963,43 @@ aarch64_legitimize_address (rtx x, rtx /* orig_x */, machine_mode mode) > > if (GET_CODE (x) == PLUS && CONST_INT_P (XEXP (x, 1))) > { > - HOST_WIDE_INT offset = INTVAL (XEXP (x, 1)); > - HOST_WIDE_INT base_offset; > + rtx base = XEXP (x, 0); > + rtx offset_rtx XEXP (x, 1); I recently read the aarch64_legitimize_address function, and find a suspicious line of code in the above change. >> + rtx offset_rtx XEXP (x, 1); It's committed by you. It looks like a typo, and an assignment seems missing? James suggests me this is c++ initialization. Ah, yes it is! But I believe this is an coincident? As you have different initialization code above. I made an obvious patch to make it looks more intuitive, is it Okay? Regards, Renlin Li gcc/changelog: 2016-06-06 renlin li * config/aarch64/aarch64.c (aarch64_legitimize_address): Add assignment. commit 1fd77baf4ca918ed25dbce4678d7be7b7cd51be2 Author: Renlin Li Date: Mon Jun 6 11:24:39 2016 +0100 fix type diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index ad07fe1..54e6813 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4949,7 +4949,7 @@ aarch64_legitimize_address (rtx x, rtx /* orig_x */, machine_mode mode) if (GET_CODE (x) == PLUS && CONST_INT_P (XEXP (x, 1))) { rtx base = XEXP (x, 0); - rtx offset_rtx XEXP (x, 1); + rtx offset_rtx = XEXP (x, 1); HOST_WIDE_INT offset = INTVAL (offset_rtx); if (GET_CODE (base) == PLUS)