From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105293 invoked by alias); 24 Apr 2018 14:17:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 105273 invoked by uid 89); 24 Apr 2018 14:17:06 -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_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-HELO:sk:mail-it, bin.cheng, U*amker.cheng, Bin.Cheng X-HELO: mail-it0-f43.google.com Received: from mail-it0-f43.google.com (HELO mail-it0-f43.google.com) (209.85.214.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Apr 2018 14:17:04 +0000 Received: by mail-it0-f43.google.com with SMTP id f6-v6so15706931ita.2 for ; Tue, 24 Apr 2018 07:17:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=fXvBzhQAvZHbfnTl2iai7DbfyQCDFL5PaK0ey9Obbmw=; b=hRReP9cdATJ0Dgzo6KdBRfZSzR6MUz16nukkadvvluyft/e9Ts133VF3mZV2HYm38l 72upuPjCS2Ioa5Z5d45hDn5Ms056P4T7ZcN7tQCD2HnyRSewidRaiUKmrqD44h9atfhf SUWt2bWsNNIfyFRioeDa8TLhlL8GYV7VEPmRpU5kwitwkpN+ax/dbDdaWAniairmL64d Biqhy3qXkcOMKZIWNVChEwaej+IrgGcO6g7n1MFjl9y8RbxQBrboAEVOzqgBwt7G0OIk yPv91VragEMUycZbKtH/L6KCJ0nKxiDQAx4lKEIHRsfgS4lI4OYXip0eRkOJ+b3M3shY ji/A== X-Gm-Message-State: ALQs6tBFdusS6loM7kiRCi3UZvqBEVRHFO9rdDQBSLWBVxfFxaaKq2qO GkHxIYHjvuTxUgIAdVUcZQZqEFtdCG0Gl4neq5A= X-Google-Smtp-Source: AIpwx48J6kf3w+uvxyb13QJ0PKypigEWu63MWaUCUMOry5oT3kGA7Ka4H0Ii2/2TKRHQ48gfvtHJ2ROVK5HDPpKhdpM= X-Received: by 2002:a24:89d7:: with SMTP id s206-v6mr18093093itd.7.1524579422835; Tue, 24 Apr 2018 07:17:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:b40e:0:0:0:0:0 with HTTP; Tue, 24 Apr 2018 07:17:02 -0700 (PDT) In-Reply-To: References: <5AABAF14.6090003@foss.arm.com> <87d10313qo.fsf@linaro.org> From: "Bin.Cheng" Date: Tue, 24 Apr 2018 15:14:00 -0000 Message-ID: Subject: Re: [PATCH AArch64]Fix test failure for pr84682-2.c To: "gcc-patches@gcc.gnu.org" , "Richard Earnshaw (lists)" , Richard Sandiford Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg01086.txt.bz2 On Thu, Mar 22, 2018 at 11:07 AM, Bin.Cheng wrote: > On Sat, Mar 17, 2018 at 8:54 AM, Richard Sandiford > wrote: >> Kyrill Tkachov writes: >>> Hi Bin, >>> >>> On 16/03/18 11:42, Bin Cheng wrote: >>>> Hi, >>>> This simple patch fixes test case failure for pr84682-2.c by returning >>>> false on wrong mode rtx in aarch64_classify_address, rather than assert. >>>> >>>> Bootstrap and test on aarch64. Is it OK? >>>> >>>> Thanks, >>>> bin >>>> >>>> 2018-03-16 Bin Cheng >>>> >>>> * config/aarch64/aarch64.c (aarch64_classify_address): Return false >>>> on wrong mode rtx, rather than assert. >>> >>> This looks ok to me in light of >>> https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00633.html >>> This function is used to validate inline asm operands too, not just >>> internally-generated addresses. >>> Therefore all kinds of garbage must be rejected gracefully rather than ICEing. >>> >>> You'll need an approval from an AArch64 maintainer though. >> >> IMO we should make address_operand itself check something like: >> >> (GET_MODE (x) == VOIDmode || SCALAR_INT_MODE_P (GET_MODE (x))) >> >> Target-independent code fundamentally assumes that an address will not >> be a float, so I think the check should be in target-independent code >> rather than copied to each individual backend. >> >> This was only caught on aarch64 because we added the assert, but I think >> some backends ignore the mode of the address and so would actually accept >> simple float rtxes. > Hi Richard, > Thanks for the suggestion generalizing the fix. Here is the updated patch. > Bootstrap and test on x86_64 and AArch64, is it OK? Ping. Better to have this ICE fix in GCC8? But I guess RTL review/approval is needed. Thanks, bin > > Thanks, > bin > > 2018-03-22 Bin Cheng > > * recog.c (address_operand): Return false on wrong mode for address. > * config/aarch64/aarch64.c (aarch64_classify_address): Remove assert > since it's checked in general code now. > >> >> Thanks, >> Richard