From patchwork Wed Nov 22 15:21:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 168409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1400655vqb; Wed, 22 Nov 2023 07:21:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNXJfiH/5Zy05oxSNJYFj82HTjK8KTYYgxLoJary4zAW56SjIdvwrKjgnfHJWM4MmLQMOI X-Received: by 2002:a05:6214:2429:b0:679:e92a:c6dc with SMTP id gy9-20020a056214242900b00679e92ac6dcmr3065372qvb.33.1700666518982; Wed, 22 Nov 2023 07:21:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700666518; cv=pass; d=google.com; s=arc-20160816; b=yobV0dTlKsGReivHjwBVfePIPKip5S/7EzX5GumaZTEZsoOLXIIzaM+Ytc+XpvSqjZ PZv0mUvH/Ome3u+qGJ/GBzciXaIiOS1sqBK3VOUDroP/YbKU4LrcBuaqyF+oTUpW9P0d R7kiL37DdF4zPUKmV5ohD855/QBMYJLeBq705fahQd5I3if+i8PuitQIACXXh9BXFSeR JG7DKp60laIHs28yfP6Boz5mJdPH5yp4Lm4+Iu+GksKRKt5doo31Mjf9L3WEdQ16aPEe nPWtwLrOe94YcA+lru+RbstRan1CSitRb54AxjkjcDbQQczCKMus22NgC17rmtlkJORb Z88w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:subject:cc:to:from:date:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=khv2ZlZ3fAauDnXZg+pL55MrbvS4ZfNQjHb9caWA2Bc=; fh=7cFAgls7YHOfU2lZBIPZcYXd1UyO1fbMQHVLMXhVxfs=; b=CSnQyyz83a/9WOh6c297xIHZft3c1dagyA+OLi+GshlTAGKIiHEGGmQkwasxSL1xc7 cS0QLq8ClgYpUAnHoGranEH08VYXTc7KlJz/3F44wEKLvyimcodkp/CtWoFfsOHbDofn 2Peo7LQcrMDvE1V8mz/I2pLfq098E7rUjia+7/ZGhMXB+c6tVmhQlPJB5CbmexjJ3fFW 0/Ygryxjohj9hS8Xl8UXo2UyF8NOl6MMrn85omTXCtna2s/FrRWANYO235l6PFc8pO4Y YxLA8/aJPdkJaP4brRpUlAWYH4PUURZojw0BtMl8XwCeHZjgZUPzCEwUd7TcwPjXkjTS X+nQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=BgWHIWEY; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id k10-20020a05620a414a00b0076dbb17e788si11676164qko.721.2023.11.22.07.21.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=BgWHIWEY; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC2DB3858291 for ; Wed, 22 Nov 2023 15:21:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 4C3213858D35 for ; Wed, 22 Nov 2023 15:21:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C3213858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4C3213858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700666494; cv=none; b=ks/71+mgU5u1iA+OzTfJTvLyE9rI37j01EIatU77hSDKQ1TguIu27GGPbOVnC2fbzB3FYJuNn/KPMu09uG7e/T2HBjSjoKqfQqP/YaZw4Hj0yGfBGvciQYSe4/7hLirXrEPNnYixGQjrkZTlQdtnAVmpYWmMCe9F+McPwGI+QI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700666494; c=relaxed/simple; bh=y4Y0CTlCni0vhrSXwRt0592CzDCHyNdeo0dHYHBoaJo=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=X2uftQI5/V1ghSuL23ZfibtbdGi0bThTcscb7e6fOsYS+ORmA0brlwXcCUiIo2dnKdocmeH9KMeYSSB08BVboCbXoDmVVXaHXnc1Z08NTI3IH6YTte0wLotB4mxMPvW0D9YJMYr9sGZ91ixFnmzttBQpML7VwnK2dZFRxB8AoqE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a00a9c6f283so389147366b.0 for ; Wed, 22 Nov 2023 07:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1700666492; x=1701271292; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=khv2ZlZ3fAauDnXZg+pL55MrbvS4ZfNQjHb9caWA2Bc=; b=BgWHIWEY1LEaVA7XKso9tVyI/F3jetJObgPnoHfYPhy1dduegda3XWPvDZp5QQ2gYI HKmOIR86zUXCren5FjgrxBtQPM/C6Kr/0FyQyyfbA1bTCUPaYSQael9kYQQTBR9Z9O7U cnGyNlfeUKEPrrVGoqKR/0va9NAAGiY1YdPQZkZXldKX2yWXhFpfYLqUb2yGXeUt3x/7 2xq0wkeKaSNMQqRiDM7SKAN79O73uDnFlDs2bhvwZCGQDGbnrnIVDIWcjMVGQKl3Eqtf lwJh3Bu/rqyVqV1IQ1hndhhAwyZ0w83O1zvJ0pGg6UVzST83ibLu8ydKdxH2o76PGnT8 uPKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700666492; x=1701271292; h=mime-version:user-agent:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=khv2ZlZ3fAauDnXZg+pL55MrbvS4ZfNQjHb9caWA2Bc=; b=pZNppOqiPTusypEuUTJiZntki4twdlZUujpWfsLGjHNCqv4RCvkg0WZ2VBoptmY3do rRFaSJKQYKNbgtrM/ShMK3ddl1qV6uPtE5Gl/ia9GXKJSX2qUpxswT42W56cPsfI0Qo0 Az+xmuKM1YyC07a3mMlOqA0LkIm195aZkgALhQLdwqT9MKrvI7k8FuEwCnqJui/dF/WG nkdqqvCHXZVuaS8R7CDhiodkncv+gBnWYYjUaP+ZEmbBa5F+yl1LKCaTqGWZEGvqJEgt 4VJBKY/CA10LANZNJaOU74HNZBOQl3mZkMawBFKt6euUx+udtVOIvV9upykIN7CWsZZY iaXw== X-Gm-Message-State: AOJu0YyfH6VrvamUSfsJMlMsMUgufAw9QvdlAua9gWR/5thAxtvkyZtO KUsh3tCEIpxhxP8Ylf8Ns6VnVjBqHnPb7MDNbNsNkQ== X-Received: by 2002:a17:906:4683:b0:a01:e916:3584 with SMTP id a3-20020a170906468300b00a01e9163584mr1926757ejr.54.1700666491903; Wed, 22 Nov 2023 07:21:31 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id k22-20020a1709063fd600b009f8af454d0dsm6422953ejj.112.2023.11.22.07.21.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2023 07:21:31 -0800 (PST) Date: Wed, 22 Nov 2023 15:21:27 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: Richard Earnshaw , Richard Sandiford , Marcus Shawcroft , Kyrylo Tkachov , Jeff Law Subject: [PATCH] AArch64/testsuite: Use non-capturing parentheses with ccmp_1.c Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783278095550784533 X-GMAIL-MSGID: 1783278095550784533 Use non-capturing parentheses for the subexpressions used with `scan-assembler-times', to avoid a quirk with double-counting. gcc/testsuite/ * gcc.target/aarch64/ccmp_1.c: Use non-capturing parentheses with `scan-assembler-times'. --- Hi, Here's another one. I realised my original regexp used to grep the tree for `scan-assembler-times' with subexpressions was too strict and with an updated pattern I found this second test case that does regress once the `scan-assembler-times' double-counting quirk has been fixed. As with the ARM change we don't need capturing parentheses here, usually used for back references, so let's just avoid the double-counting quirk altogether and make our matching here work whether the quirk has been fixed or not. Verified for the `aarch64-linux-gnu' target with the quirk fix submitted as and the aarch64.exp subset of the C language test suite. OK to apply? Maciej --- gcc/testsuite/gcc.target/aarch64/ccmp_1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) gcc-aarch64-test-ccmp_1-non-capturing.diff Index: gcc/gcc/testsuite/gcc.target/aarch64/ccmp_1.c =================================================================== --- gcc.orig/gcc/testsuite/gcc.target/aarch64/ccmp_1.c +++ gcc/gcc/testsuite/gcc.target/aarch64/ccmp_1.c @@ -86,8 +86,8 @@ f13 (int a, int b) /* { dg-final { scan-assembler "cmp\t(.)+35" } } */ /* { dg-final { scan-assembler-times "\tcmp\tw\[0-9\]+, 0" 4 } } */ -/* { dg-final { scan-assembler-times "fcmpe\t(.)+0\\.0" 2 } } */ -/* { dg-final { scan-assembler-times "fcmp\t(.)+0\\.0" 2 } } */ +/* { dg-final { scan-assembler-times "fcmpe\t(?:.)+0\\.0" 1 } } */ +/* { dg-final { scan-assembler-times "fcmp\t(?:.)+0\\.0" 1 } } */ /* { dg-final { scan-assembler "adds\t" } } */ /* { dg-final { scan-assembler-times "\tccmp\t" 11 } } */