From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by sourceware.org (Postfix) with ESMTPS id DCA3E3858C2C for ; Sun, 16 Oct 2022 05:03:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DCA3E3858C2C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-358bf076f1fso80583327b3.9 for ; Sat, 15 Oct 2022 22:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lWXCIrPVZ/NwzvtMfgrqoFCgEh0FKTW9LP6vC4k+jCs=; b=Kn9foPGMfW4Cxp5wCZd+IBg+BnNphJXr+iFWonatwhXNvyc4zpOG8NamKtMscL4wRH ESpiUawid0hoTQr4YTWZSvI+FMMBuSvygT811RBZWjiKAaLOn5PnStPpBmceauu0n/HA rZD3daLD2qsRbyJui5yWJW20H74XzxA+OaM2ow9CnHOEqRrSqzqVKSXvG0xG4KBSb/qi akWI8OhDG0X60FnaIzEePueTS0T82hgwkTcUrZnTro68PR8UU5lGysDJFzWYwTYtekuw o9k7wAMfKXi/iut4XPT0B03IgmmPUH3Q8yx2SMV1TGKF6vDy6W6awrg7EfjZ0TmUjgCB ox8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lWXCIrPVZ/NwzvtMfgrqoFCgEh0FKTW9LP6vC4k+jCs=; b=dU2AUd0y32pq/e0VhqipKqgVz8C7Rz4DhYIjnmZFMQkyQuLPFqlJRKmRFtSdnlVRaB rFuB9WfDS1zykbhyvA1XzpiSQ8vfgYpbQC84DPTPG2X9f7bBpxikJSGXUSIbG9tASxT9 89Y55UTS2s7BlBBpKjvKDu4RRo1xa0YV7zw6FoztxyQx8W5QdFTY/lhcLVqYI8EkI2JH k4xz8GJkWO/7aWh+I1tAZ7QCSunJH1CdL+EMlltTDzZwgus7lp+SOZ2C0x8AovFPb4SI bhIIRC28qP6e9ITtyUmukOBEOCM6u4seCOH+U7cMYELMF5MROZQRI7cAD7c2g8uSrDxX Jxcw== X-Gm-Message-State: ACrzQf3KImMrYoPsDViRwoDxVvZcAOc1oB8KvAdnhEMJFfnZeXBfL8ZK A7S8wUY5LCZzI840zxohJybyY3Lu5AYPGAL0YmXL97yQIAs= X-Google-Smtp-Source: AMsMyM5REtPKEqG/eRnF/BPYj3c+p02KfoSKV6qyuUEEyngi0x7qzpjNnWwM5n+J92bqRvP1EdbiToNaDVZybd3QQD4= X-Received: by 2002:a81:591:0:b0:35f:9c14:1424 with SMTP id 139-20020a810591000000b0035f9c141424mr4432670ywf.48.1665896626264; Sat, 15 Oct 2022 22:03:46 -0700 (PDT) MIME-Version: 1.0 References: <7e3fe210-6dbc-fc29-dbb8-b951e89cf7e9@yahoo.co.jp> <87f124f0-8a10-6c3b-6b12-cabf855e2e4b@yahoo.co.jp> <3296b387-083a-40cf-1bb5-40269e804f52@yahoo.co.jp> In-Reply-To: <3296b387-083a-40cf-1bb5-40269e804f52@yahoo.co.jp> From: Max Filippov Date: Sat, 15 Oct 2022 22:03:34 -0700 Message-ID: Subject: Re: [PATCH] xtensa: Prepare the transition from Reload to LRA To: "Takayuki 'January June' Suwa" Cc: GCC Patches , Jeff Law Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Suwa-san, On Fri, Oct 14, 2022 at 4:19 AM Takayuki 'January June' Suwa wrote: > This patch provides the first step in the transition from Reload to LRA > in Xtensa. > > gcc/ChangeLog: > > * config/xtensa/xtensa-proto.h (xtensa_split1_is_finished_p): > New prototype. > * config/xtensa/xtensa.cc > (xtensa_split1_is_finished_p, xtensa_lra_p): New functions. > (TARGET_LRA_P): Replace the dummy hook with xtensa_lra_p. > (xt_true_regnum): Rework. > * gcc/config/xtensa/xtensa.h (CALL_REALLY_USED_REGISTERS): > Rename from CALL_USED_REGISTERS, and remove what correspond to > FIXED_REGISTERS. > * gcc/config/xtensa/constraints.md (Y): > Use !xtensa_split1_is_finished_p() instead of can_create_pseudo_p(). > * gcc/config/xtensa/predicates.md (move_operand): Ditto. > * gcc/config/xtensa/xtensa.md: > Add new split pattern that puts out-of-constraint integer constants > into the constant pool. > * gcc/config/xtensa/xtensa.opt (-mlra): New target-specific option > for testing purpose. > --- > gcc/config/xtensa/constraints.md | 2 +- > gcc/config/xtensa/predicates.md | 2 +- > gcc/config/xtensa/xtensa-protos.h | 1 + > gcc/config/xtensa/xtensa.cc | 48 ++++++++++++++++++++++++------- > gcc/config/xtensa/xtensa.h | 6 ++-- > gcc/config/xtensa/xtensa.md | 12 ++++++++ > gcc/config/xtensa/xtensa.opt | 4 +++ > 7 files changed, 60 insertions(+), 15 deletions(-) Thank you for doing this, I couldn't find time to get back to it since 2020 ): This change results in a few new regressions in the following tests caused by ICE even when running without -mlra option: +FAIL: gcc.c-torture/execute/pr92904.c -O1 (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: gcc.c-torture/execute/pr92904.c -O2 (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: gcc.c-torture/execute/pr92904.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: gcc.c-torture/execute/pr92904.c -O3 -g (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: gcc.c-torture/execute/pr92904.c -Os (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: gcc.c-torture/execute/pr92904.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: gcc.c-torture/execute/pr92904.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: g++.dg/torture/vshuf-v2si.C -O3 -g (internal compiler error: in extract_insn, at recog.cc:2791) +FAIL: g++.dg/torture/vshuf-v8qi.C -O3 -g (internal compiler error: in extract_insn, at recog.cc:2791) The backtraces look like this in all of them: gcc/gcc/testsuite/gcc.c-torture/execute/pr92904.c:395:1: error: unrecognizable insn: (insn 10501 7 10502 2 (set (reg:SI 5913) (const_int 1431655765 [0x55555555])) "gcc/gcc/testsuite/gcc.c-torture/execute/pr92904.c":239:9 -1 (nil)) during RTL pass: subreg3 gcc/gcc/testsuite/gcc.c-torture/execute/pr92904.c:395:1: internal compiler error: in extract_insn, at recog.cc:2791 0x6b17f7 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) gcc/gcc/rtl-error.cc:108 0x6b187a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) gcc/gcc/rtl-error.cc:116 0x6a2aa4 extract_insn(rtx_insn*) gcc/gcc/recog.cc:2791 0x179e94d decompose_multiword_subregs gcc/gcc/lower-subreg.cc:1678 0x179ebdd execute gcc/gcc/lower-subreg.cc:1820 There's also the following runtime failures, but only on call0 configuration: +FAIL: gcc.c-torture/execute/20010122-1.c -O1 execution test +FAIL: gcc.c-torture/execute/20010122-1.c -O2 execution test +FAIL: gcc.c-torture/execute/20010122-1.c -O3 -g execution test +FAIL: gcc.c-torture/execute/20010122-1.c -Os execution test +FAIL: gcc.c-torture/execute/20010122-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test -- Thanks. -- Max