From patchwork Wed Mar 8 05:03:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 66108 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2319D3854178 for ; Wed, 8 Mar 2023 05:04:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2319D3854178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678251854; bh=uSf00FKOJUJ1XgZE5uFYItbN4Z6SVi1uoo60lKnlVP4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GrqVcN2DB4Qa0qj8957feHac/mTJFMNa515KNR34FCurmmS05dAdCbRAOdOTLRIRU 3yB388Sg068bmdrhj8+Y4YdNG1wkcehyN7j+7p8O2PduRAJFWhMVmExagQF68hPck4 U5V6c1maLzU2cLdEzowTRVRPIKx7pY1kyx7VSZbE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by sourceware.org (Postfix) with ESMTPS id CD6693858C30 for ; Wed, 8 Mar 2023 05:03:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD6693858C30 Received: by mail-qv1-xf33.google.com with SMTP id ks17so10449841qvb.6 for ; Tue, 07 Mar 2023 21:03:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678251824; h=subject:to:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uSf00FKOJUJ1XgZE5uFYItbN4Z6SVi1uoo60lKnlVP4=; b=uC3cZZZjh1Pkn1RYBHlM4wUnCD49Oa/+KgVNhqiO39gGHOAAO3Lpd8XpEbc+qmakkf tpRWRFRzFhckN2xZCOKVBKFaG2eP852WPXLZZYnJ9KzbVleTJBIuylHXEAoFC//981/L rJoxrMMXuQG1/DK/k0yO7FXUzAzK26Kgv/jb7SdoHw3zRIeYwodTBBIVMyagt339IBhX VaAndyn4l9aWQGx49ooc+9NtSmeMrFhHWwZ2QfDtYp+p/CF/3cIduGe/K4eojqNE84oa ICFCcb0hBHI91nj3GVrnW+3ZXnYak1b8LWH176UcC0SRle8OCx737eVsEFxPkqYKjr56 IziA== X-Gm-Message-State: AO0yUKUKUyaJsGxXiXaMhytX2aTqGHHPYW3M2pwJj0AQH9rqvbdUW9rz htu8D/riYgE0KYFx4iH4nf3JEheX2wg= X-Google-Smtp-Source: AK7set/p2Q/GmGOX3rAchrDJz8ArMsrYpUzIPuEiqVME3lxJyMs+aoi6i3SBHD+ReUN6t7em46XrjA== X-Received: by 2002:a05:6214:248e:b0:56e:a6f1:8cf with SMTP id gi14-20020a056214248e00b0056ea6f108cfmr31394604qvb.6.1678251824485; Tue, 07 Mar 2023 21:03:44 -0800 (PST) Received: from ?IPV6:2607:fb90:27d6:6fc3:b87d:c36d:b24b:45bc? ([2607:fb90:27d6:6fc3:b87d:c36d:b24b:45bc]) by smtp.gmail.com with ESMTPSA id x22-20020a05620a0b5600b006ee8874f5fasm10547481qkg.53.2023.03.07.21.03.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 21:03:43 -0800 (PST) Message-ID: <413a4370-a98a-62d1-e652-cc74e56610f4@gmail.com> Date: Tue, 7 Mar 2023 22:03:41 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Subject: [committed] Fix MIPS testsuite over-eager matching X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jeff Law via Gcc-patches From: Jeff Law Reply-To: Jeff Law Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" The mips msa-ds.c test is trying to ensure that MSA branches can have their delay slots filled. The regexp it used looked for the function name, a nop, then the function name again. If found that sequence, then the test failed. The problem is with Vlad's recent IRA work there's simply less code in the test (good) and as a result one of the *other* branches in the test had an unfilled delay slot -- the delay slot for the MSA branch was still being filled. This patch tightens up the regexp. In particular it looks for the MSA branch and a nop on the next line (avoiding the over-eager .* construct). That indicates that the MSA branch did not have its delay slot filled. When that sequence is found, then the test fails. This fixes the recent regressions for mips64 and mips64el in the tester. Installing on the trunk, jeff commit 0d25f8265b3ba9338f4572ac3fab08e3f33367a5 Author: Jeff Law Date: Tue Mar 7 22:00:39 2023 -0700 Fix MIPS testsuite over-eager matching The mips msa-ds.c test is trying to ensure that MSA branches can have their delay slots filled. The regexp it used looked for the function name, a nop, then the function name again. If found that sequence, then the test failed. The problem is with Vlad's recent IRA work there's simply less code in the test (good) and as a result one of the *other* branches in the test had an unfilled delay slot -- the delay slot for the MSA branch was still being filled. This patch tightens up the regexp. In particular it looks for the MSA branch and a nop on the next line (avoiding the over-eager .* construct). That indicates that the MSA branch did not have its delay slot filled. When that sequence is found, then the test fails. This fixes the recent regressions for mips64 and mips64el in the tester. Installing on the trunk, gcc/testsuite: * gcc.target/mips/msa-ds.c: Fix over eager pattern matching. diff --git a/gcc/testsuite/gcc.target/mips/msa-ds.c b/gcc/testsuite/gcc.target/mips/msa-ds.c index c6932b280cb..37957a02bd8 100644 --- a/gcc/testsuite/gcc.target/mips/msa-ds.c +++ b/gcc/testsuite/gcc.target/mips/msa-ds.c @@ -27,5 +27,9 @@ int __attribute__ ((cold)) bar (v4si v , int a, int b) return b + c; } -/* { dg-final { scan-assembler-not "foo:.*nop.*jr.*foo," } } */ -/* { dg-final { scan-assembler-not "bar:.*nop.*jr.*bar," } } */ +/* We need to avoid over matching here as we could have other + branches with unfilled slots. So we verify that we do not have + an MSA branch with a NOP in its delay slot. We need to match + both forms of the MSA branch that can occur in this test. */ +/* { dg-final { scan-assembler-not "foo:.*bn\?z.w\[^\\n\\r\]*\\n\\tnop" } } */ +/* { dg-final { scan-assembler-not "bar:.*bn\?z.w\[^\\n\\r\]*\\n\\tnop" } } */