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: 1867403 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=BgWHIWEY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sb4j90WPKz1yRq for ; Thu, 23 Nov 2023 02:21:49 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3BB503857BB7 for ; Wed, 22 Nov 2023 15:21:46 +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-Google-Smtp-Source: AGHT+IFHmheQAxwR24IWmB8M9AEiLDr+eGysMDo0dv1HoxmMXt5rdjawZOIEJy4NS1tsIES1dG8+JQ== 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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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 } } */