From patchwork Tue Mar 21 12:14:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 72837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1740011wrt; Tue, 21 Mar 2023 05:15:34 -0700 (PDT) X-Google-Smtp-Source: AK7set9szkV12fe/pLy/03f4v/1/QmtZi2znWnCuKDARuGeUSnDUgkIpKABOEcvHimRRrGcB4f7n X-Received: by 2002:a17:906:b0b:b0:930:f149:7865 with SMTP id u11-20020a1709060b0b00b00930f1497865mr2528569ejg.21.1679400934230; Tue, 21 Mar 2023 05:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679400934; cv=none; d=google.com; s=arc-20160816; b=JtiXRxh6AtKnJgSVOP0FjHSl+r8HlwfMKEP3BnleEuUNK6vMadqPsw4rN05NpeQJo9 +udJ/QUiyvZdlRAHcOO7/pMdsfK8loGvQrhELmYJFnwRq++9DyB3Lw2PG6pVxkc7dGaG RlADFTXjaVFlHmqZWnhnyuMY2fBXzEIRwzDpXRok6OC/aGSdmEV74I2glw4GAIbqeJuS UeW+xROzQsqAnxdvAi/ybeFPEemcdO2FbWeiD+Eq7Q31mg2KxFAzTdwuKf6A9o3UQr3m PJAlpCYW93cawaRH9ETRC387ecFGvvQ4ixyXO82F5aVsUFsZg0CjK8TgrGcKvxbv/t1j HZIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=37eD8AjQQqrauPR1tFHdtuTO5vpqQxIQM+WIp2ChSN4=; b=U2KE5qfZPThfPQ+a51fNVMQd3tC2swSj3b91E0Vo0zFZf4Rwq76dRY2Gb+QojVEuNJ LKF0RKdlC7PjM5xpXWTxLULZEbulPjtaTYHJFQbOgdffZX7QOummf75J5kCgWL5dyZNx kcJesVzhnjjjGHFfDsODaHXnW0YWv1asYygd1EDdk4CVqPbd0JeSPKvpB6Yw0CYpX4u8 NHazMUDXHBYrVV5uw0EnB3T/W5DHnF/eQ2e/VbeRiu6tFJ8T20h68J3g8caVHN1jhmhT pliHKLlqlMz8Ndft7Cstpvkuiz1yS9CKCj6TV+UY774BlyIRQrG9/4daZktNDRA5fvwx +fhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FNGcgk3z; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ba17-20020a0564021ad100b004bd4b029f4fsi12631917edb.297.2023.03.21.05.15.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 05:15:34 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=FNGcgk3z; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 399B03858004 for ; Tue, 21 Mar 2023 12:15:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 399B03858004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679400933; bh=37eD8AjQQqrauPR1tFHdtuTO5vpqQxIQM+WIp2ChSN4=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=FNGcgk3zWVmIdgRDkxVsWTbzjvybJokF1jbQ+7f8VMXliE8rlW4D+e4rlTShQHBbH EHXPyBIgkMaC/bERTUyJ0ews4TOJIuPcjcKK8oRWj5lE3n2GYXkGX67pyHpKcfDSUB VaQa5N9Tat9QmMlO47nLYXendKLyNHSLqxi9wfVk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CBDF23858D37 for ; Tue, 21 Mar 2023 12:14:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CBDF23858D37 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-70-6vBof04aMkW6e5JEXiBnhA-1; Tue, 21 Mar 2023 08:14:45 -0400 X-MC-Unique: 6vBof04aMkW6e5JEXiBnhA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CF8C2999B2F; Tue, 21 Mar 2023 12:14:45 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B50581121314; Tue, 21 Mar 2023 12:14:44 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 32LCEfJR1177602 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:14:42 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 32LCEeU11177601; Tue, 21 Mar 2023 13:14:40 +0100 Date: Tue, 21 Mar 2023 13:14:40 +0100 To: Richard Biener , Andrew Stubbs Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up vect-simd-clone1[678]*.c tests [PR108898] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760979514152168369?= X-GMAIL-MSGID: =?utf-8?q?1760979514152168369?= Hi! As mentioned in the PR, vect-simd-clone-1[678]{,f}.c tests FAIL on x86_64-linux with -m64/-march=cascadelake or -m32/-march=cascadelake, there are 3 matches for the calls rather than expected two. As suggested by Richi, this patch changes those tests to use --param vect-epilogues-nomask=0 such that it is more predictable on how many calls will show up. In the non-[a-f] suffixed tests, the scan-tree-dump-times patterns were expecting 2 for non-aarch64 and 3 for aarch64, which is a puzzle for me, because vect_simd_clones effective target is apparently never true on aarch64 (just on x86 in some cases and on amdgcn; perhaps something to change for GCC14, but I guess too late for stage4). That said, I have looked at aarch64 dumps and see only 2 calls with --param vect-epilogues-nomask=0 and 3 with --param vect-epilogues-nomask=1 or without it, so I have tweaked those to always expect the same thing. Another thing is some tests uselessly had -fdump-tree-optimized in dg-options even when they don't scan anything there. Tested on x86_64-linux with make -j32 -k check-gcc RUNTESTFLAGS="vect.exp=gcc.dg/vect/vect-simd-clone-*.c --target_board='unix{-m64/-march=x86-64,-m64/-march=cascadelake,-m32/-march=i686,-m32/-march=cascadelake}'" and aarch64-linux (where all tests are UNSUPPORTED before/after), ok for trunk? 2023-03-21 Jakub Jelinek PR testsuite/108898 * gcc.dg/vect/vect-simd-clone-16.c: Add --param vect-epilogues-nomask=0 to dg-additional-options. Always expect just 2 foo.simdclone calls. * gcc.dg/vect/vect-simd-clone-16f.c: Add --param vect-epilogues-nomask=0 to dg-additional-options. * gcc.dg/vect/vect-simd-clone-17.c: Likewise. Always expect just 2 foo.simdclone calls. * gcc.dg/vect/vect-simd-clone-17d.c: Remove -fdump-tree-optimized from dg-additional-options. * gcc.dg/vect/vect-simd-clone-17e.c: Likewise. * gcc.dg/vect/vect-simd-clone-17f.c: Likewise. Add --param vect-epilogues-nomask=0 to dg-additional-options. * gcc.dg/vect/vect-simd-clone-18.c: Add --param vect-epilogues-nomask=0 to dg-additional-options. Always expect just 2 foo.simdclone calls. * gcc.dg/vect/vect-simd-clone-18f.c: Add --param vect-epilogues-nomask=0 to dg-additional-options. Jakub --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c 2023-03-21 12:21:44.084547190 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd" } */ +/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ /* Test that simd inbranch clones work correctly. */ @@ -82,8 +82,7 @@ main () /* Ensure the the in-branch simd clones are used on targets that support them. Some targets use another call for the epilogue loops. */ -/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" { target { ! aarch64*-*-* } } } } */ -/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 3 "vect" { target aarch64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" } } */ /* The LTO test produces two dump files and we scan the wrong one. */ /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-16f.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-16f.c 2023-03-21 12:22:17.122068835 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd" } */ +/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #define TYPE __INT64_TYPE__ --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-17.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-17.c 2023-03-21 12:23:35.811929497 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd" } */ +/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ /* Test that simd inbranch clones work correctly. */ @@ -82,8 +82,7 @@ main () /* Ensure the the in-branch simd clones are used on targets that support them. Some targets use another call for the epilogue loops. */ -/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" { target { ! aarch64*-*-* } } } } */ -/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 3 "vect" { target aarch64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" } } */ /* The LTO test produces two dump files and we scan the wrong one. */ /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-17d.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-17d.c 2023-03-21 12:24:45.960913814 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */ +/* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #define TYPE char --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-17e.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-17e.c 2023-03-21 12:25:04.382647087 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */ +/* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #define TYPE double --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-17f.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-17f.c 2023-03-21 12:24:01.078563662 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */ +/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #define TYPE __INT64_TYPE__ --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-18.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-18.c 2023-03-21 12:25:36.200186401 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd" } */ +/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ /* Test that simd inbranch clones work correctly. */ @@ -82,8 +82,7 @@ main () /* Ensure the the in-branch simd clones are used on targets that support them. Some targets use another call for the epilogue loops. */ -/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" { target { ! aarch64*-*-* } } } } */ -/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 3 "vect" { target aarch64*-*-* } } } */ +/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" } } */ /* The LTO test produces two dump files and we scan the wrong one. */ /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ --- gcc/testsuite/gcc.dg/vect/vect-simd-clone-18f.c.jj 2023-02-22 15:58:59.661862434 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-simd-clone-18f.c 2023-03-21 12:26:04.950770124 +0100 @@ -1,5 +1,5 @@ /* { dg-require-effective-target vect_simd_clones } */ -/* { dg-additional-options "-fopenmp-simd" } */ +/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #define TYPE __INT64_TYPE__