From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120642 invoked by alias); 30 Aug 2018 10:28:35 -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 120633 invoked by uid 89); 30 Aug 2018 10:28:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f66.google.com Received: from mail-oi0-f66.google.com (HELO mail-oi0-f66.google.com) (209.85.218.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Aug 2018 10:28:33 +0000 Received: by mail-oi0-f66.google.com with SMTP id b15-v6so14477635oib.10 for ; Thu, 30 Aug 2018 03:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zq5bRrfb+QHKeMrc8vCW2dxY3aAO7t+4xUoCXmnQlJM=; b=iwSj/F1012Sl5RY9y6x22811eBsBEqf5xNs55USHlsd6GGMdlA3LH+lpbVgRxgR+iA ALWATIrvhajzXCYOiejJwUkyBXHLOXR5ySk7NStafHM39XTqDXDdWCjd+hLjaFMFQZYw oRdRfBj1C9mA2OlyECJARnBz1LEuxHzy+OaLIBmCb8S+E+SmxmziVInKV6NYbu1z3DjJ RlCseG4GVsCto9XqKYg2/zALJN05ikyOqEPfNL8Rc9hcF3PuiJ6x00pAHxLtu+aVi8GI P7sIwErPeG1CcVIeVE2l5wZIjpT0XXJQnsd4gTBN1svrxQdmTUzmj3muYH3WGbLQ46b7 37xA== MIME-Version: 1.0 References: <5AABAF14.6090003@foss.arm.com> <87d10313qo.fsf@linaro.org> <5AFBEA09.7040606@foss.arm.com> <87tvndm2lz.fsf@arm.com> In-Reply-To: From: Joey Ye Date: Thu, 30 Aug 2018 10:28:00 -0000 Message-ID: Subject: Re: [PATCH AArch64]Fix test failure for pr84682-2.c To: "Bin.Cheng" Cc: gcc-patches , richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg01965.txt.bz2 typo: s/reorg.c/recog.c/g On Thu, Aug 30, 2018 at 11:20 AM Joey Ye wrote: > > Hi Bin & Richard, > > It is not as simple as keeping the assertion, which still fails even > with the change in reorg.c. The testing result is as following: > > I. With Bin's patch version 2 (removing the assertion in aarch64.c and > adding the check in reorg.c): pr84682-2.c passes > > II. With Richard's suggestion to keep the assertion in aarch64, but > adding the check in reorg.c: pr84682-2.c fails > > Apparently there is a different path that reaches the assertion. > > With II: > /build/trunk/src/gcc/gcc/testsuite/gcc.dg/torture/pr84682-2.c: In > function 'b': /build/trunk/src/gcc/gcc/testsuite/gcc.dg/torture/pr84682-2.c:10:1: > internal compiler error: in aarch64_classify_address, at > config/aarch64/aarch64.c:5721 > 0xfa4071 aarch64_classify_address > /build/trunk/src/gcc/gcc/config/aarch64/aarch64.c:5720 > 0xfa94f3 aarch64_legitimate_address_hook_p > /build/trunk/src/gcc/gcc/config/aarch64/aarch64.c:6003 > 0xb85661 strict_memory_address_addr_space_p(machine_mode, rtx_def*, > unsigned char) > /build/trunk/src/gcc/gcc/reload.c:2177 > 0xb75da9 constrain_operands(int, unsigned long) > /build/trunk/src/gcc/gcc/recog.c:2706 > 0xb761a0 extract_constrain_insn(rtx_insn*) > /build/trunk/src/gcc/gcc/recog.c:2210 > 0xa6dd57 check_rtl > /build/trunk/src/gcc/gcc/lra.c:2182 > 0xa737db lra(_IO_FILE*) > /build/trunk/src/gcc/gcc/lra.c:2616 > 0xa25989 do_reload > /build/trunk/src/gcc/gcc/ira.c:5469 > 0xa25989 execute > > Current trunk without any patch: > /build/trunk/src/gcc/gcc/testsuite/gcc.dg/torture/pr84682-2.c: In > function 'b': /build/trunk/src/gcc/gcc/testsuite/gcc.dg/torture/pr84682-2.c:9:3: > internal compiler error: in aarch64_classify_address, at > config/aarch64/aarch64.c:5721 > 0xfa4011 aarch64_classify_address > /build/trunk/src/gcc/gcc/config/aarch64/aarch64.c:5720 > 0xfa9493 aarch64_legitimate_address_hook_p > /build/trunk/src/gcc/gcc/config/aarch64/aarch64.c:6003 > 0xb74cf3 memory_address_addr_space_p(machine_mode, rtx_def*, unsigned char) > /build/trunk/src/gcc/gcc/recog.c:1334 > 0xb74cf3 address_operand(rtx_def*, machine_mode) > /build/trunk/src/gcc/gcc/recog.c:1073 > 0xb74cf3 asm_operand_ok(rtx_def*, char const*, char const**) > /build/trunk/src/gcc/gcc/recog.c:1817 > 0x75e591 expand_asm_stmt > /build/trunk/src/gcc/gcc/cfgexpand.c:3135 > 0x766d67 expand_gimple_stmt_1 > /build/trunk/src/gcc/gcc/cfgexpand.c:3572 > 0x766d67 expand_gimple_stmt > /build/trunk/src/gcc/gcc/cfgexpand.c:3734 > 0x768ce7 expand_gimple_basic_block > > More places need to be patched. > > Thanks, > Joey > On Thu, Aug 30, 2018 at 2:02 AM Bin.Cheng wrote: > > > > On Thu, Aug 30, 2018 at 2:47 AM Richard Sandiford > > wrote: > > > > > > Joey Ye writes: > > > > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > > > > index 07c55b1..9e965ab 100644 > > > > --- a/gcc/config/aarch64/aarch64.c > > > > +++ b/gcc/config/aarch64/aarch64.c > > > > @@ -5674,9 +5674,6 @@ aarch64_classify_address (struct aarch64_address_info *info, > > > > && (code != POST_INC && code != REG)) > > > > return false; > > > > > > > > - gcc_checking_assert (GET_MODE (x) == VOIDmode > > > > - || SCALAR_INT_MODE_P (GET_MODE (x))); > > > > - > > > > switch (code) > > > > { > > > > case REG: > > > > diff --git a/gcc/recog.c b/gcc/recog.c > > > > index 0a8fa2c..510aba2 100644 > > > > --- a/gcc/recog.c > > > > +++ b/gcc/recog.c > > > > @@ -1070,6 +1070,11 @@ general_operand (rtx op, machine_mode mode) > > > > int > > > > address_operand (rtx op, machine_mode mode) > > > > { > > > > + /* Wrong mode for an address expr. */ > > > > + if (GET_MODE (op) != VOIDmode > > > > + && ! SCALAR_INT_MODE_P (GET_MODE (op))) > > > > + return false; > > > > + > > > > return memory_address_p (mode, op); > > > > } > > > > > > > > > > The address_operand part is OK, thanks. > > > > > > I think we should keep the assert in aarch64_classify_address, since > > > IMO it's a bug for anything else to reach that point. > > > > Hi Joey, > > Could you help me update the patch as suggested by Richard and commit > > it please? My new assignment is still on the way. > > Thanks very much! > > > > Thanks, > > bin > > > > > > Richard