From patchwork Wed Mar 13 12:12:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kuvyrkov X-Patchwork-Id: 780032 Delivered-To: patch@linaro.org Received: by 2002:adf:f741:0:b0:33e:7753:30bd with SMTP id z1csp144929wrp; Wed, 13 Mar 2024 05:13:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2BStQxvTYZAdpMDQypDIn48wVp9lHmt4SwblajgCRcOymosFegn8XrZrnq0xM0sOqi9jx4XIRKI/hPy3CnF7X X-Google-Smtp-Source: AGHT+IEYKK7op/RWlcE5UhGhNp4fvTgiEZsQNEePsm6IplizEOzolMKWZ6UVW2h8g5ZnV6e91mYK X-Received: by 2002:a05:6808:f87:b0:3c3:23a8:8d8d with SMTP id o7-20020a0568080f8700b003c323a88d8dmr756311oiw.29.1710332021783; Wed, 13 Mar 2024 05:13:41 -0700 (PDT) Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f10-20020ac859ca000000b00430974d7f88si37597qtf.416.2024.03.13.05.13.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 05:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ixrCm1p3; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 697F73857C5C for ; Wed, 13 Mar 2024 12:13:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 8ADA93858C31 for ; Wed, 13 Mar 2024 12:12:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8ADA93858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8ADA93858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710331960; cv=none; b=VGQBmyeadxM/Kdvaa6q8bVoPV25W9wnoAhJ+hTjO+J5fXa684E8+ws1bxxFPumZhsXpcrOlpdycjogXiHPSgS2tFQIE1N7HcSt74KCACS6pXdcgdFZwYATFfzpOjsf9MjFQGZaTsL0dcBqbz2ZdGQYm9e5H0toUNlyKyA/wwBgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710331960; c=relaxed/simple; bh=GtdYpsbIEKZYnuQWlgrflup1ZdwAlywBMKhHql2pDqQ=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=HS4O/Zy8y3PjempUUHrFODHomVmCJJoN8Qtw6/A/I+PL98N5ZsrMirAZ9PVplRzrNin3yrn2Hp3825zr6PheFUih6rYE/Hz6dIs9N1ywrOpaM6GhFJBRPWO/juZz5ZFei3/mqV2w3SAth26oGtCBF2ft7FabgvppMyiyNq8JM5Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5135a270cadso2619341e87.1 for ; Wed, 13 Mar 2024 05:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710331953; x=1710936753; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P4cwnqnJ7T5wgTn3a/uByVDJeN++rpZWGVwJBZK/Aas=; b=ixrCm1p3Pqf/USX8cS+1itX/wQjasusyQU37tptOo/xq/JpYinDLmyTx62DqnP9pZf VwLQVPLPWA8Pu0QswNoMc9JwQmXMzrjPZn2jlFNpOpoMvEFFFxQ6Phid34KgY9JW6NIy qS17HJ4oDZlZlTgI6S7H0ay6S7C30YC+SXdfSrvdpfftwbkCAhPW1mq5T1d0sW2BK54F 3ht6UZFdaSnpfERH4TcAecYX9SeAIezm1Rrq3cGKK0qyEqrjvKZ2Mfvof1AvzzdMq1vk Wz7xDFBVRyoP5/IWdmgTNwirXHPtlKe8ekNwUzVDVltMhRbhF1QXOxJLJPaMKC3GiueS +w8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710331953; x=1710936753; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P4cwnqnJ7T5wgTn3a/uByVDJeN++rpZWGVwJBZK/Aas=; b=MfCyJkO+CFhVfVBkmY2uEB0yzRYUrfi12R5aPFTfeTDuz6dvlmYHt0U9h1YZ1En+KI /NH36Fxr9o6RpUHLiFjDF7bzXA527BJtBswph8JFFS/xkO203k7iRh9iSlR8NrjjiASI mbYKTRQ3CO+A7mW7P+uYAuhxbHb9z3RMYadOX2pTI+U1JE7p9LY99YeERUNhP0FS86Z6 9Nq9V/kiNeLFZ+W0zO/2FO8sDG9UuNgDsMSQ60KxnTixkwRX1jRO1/KwjTQZRV91A3kH SJfNzykcgMCzCZXRrslLnrqv3ru9t9Z6pVhYGdvB4iRqiI71qgvfYYh9EqLTwwgwF4pZ HkZA== X-Gm-Message-State: AOJu0YxI/Zebzzbr+kqj2axybrmETM0sphF0zRekmCQrdOja4Co+lOe8 aizARQXgNroyLr9B6qEDd3XruHnvSoT+PS+cx71NMOE+pJJdnKNeobEKMH7O/TRInOS7ycXU+6C IRQ== X-Received: by 2002:a19:8c45:0:b0:513:c505:1461 with SMTP id i5-20020a198c45000000b00513c5051461mr1999230lfj.0.1710331952790; Wed, 13 Mar 2024 05:12:32 -0700 (PDT) Received: from localhost.localdomain (static.225.72.216.95.clients.your-server.de. [95.216.72.225]) by smtp.gmail.com with ESMTPSA id n19-20020a195513000000b0051319dfe6d7sm1592605lfe.75.2024.03.13.05.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 05:12:31 -0700 (PDT) From: Maxim Kuvyrkov To: gcc-patches@gcc.gnu.org Cc: Maxim Kuvyrkov , Richard Earnshaw , Andrew Pinski , Richard Guenther , Tamar Christina Subject: [PATCH v2] [testsuite] Fixup dg-options in {gcc, g++, gfortran}.dg/vect.exp tests Date: Wed, 13 Mar 2024 12:12:00 +0000 Message-Id: <20240313121200.2793540-1-maxim.kuvyrkov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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+patch=linaro.org@gcc.gnu.org Changes in v2: - Better changelog entry. - NFC. This patch has been tested on - aarch64-linux-gnu - arm-linux-gnueabihf (VFP, NEON disabled by default), - arm-none-eabi (Soft-FP) with the following [expected] differences in the test results: - FAIL now PASS [FAIL => PASS]: Executed from: gcc:gcc.dg/vect/vect.exp gcc:gcc.dg/vect/vect.exp=gcc.dg/vect/pr113576.c (test for excess errors) gcc:gcc.dg/vect/vect.exp=gcc.dg/vect/pr113576.c -flto -ffat-lto-objects (test for excess errors) - UNSUPPORTED disappears [UNSUP=> ]: Executed from: g++:g++.dg/vect/vect.exp g++:g++.dg/vect/vect.exp=g++.dg/vect/pr84556.cc -std=gnu++98 - UNSUPPORTED appears [ =>UNSUP]: Executed from: g++:g++.dg/vect/vect.exp g++:g++.dg/vect/vect.exp=g++.dg/vect/pr84556.cc -std=c++98 - UNRESOLVED disappears [UNRES=> ]: Executed from: gcc:gcc.dg/vect/vect.exp gcc:gcc.dg/vect/vect.exp=gcc.dg/vect/pr113576.c -flto -ffat-lto-objects compilation failed to produce executable gcc:gcc.dg/vect/vect.exp=gcc.dg/vect/pr113576.c compilation failed to produce executable This patch was motivated by gcc.dg/vect/pr113576.c, which currently fails to compile for ARM targets without NEON. ======================= CUT ======================= Testsuites driven by vect.exp rely on check_vect_support_and_set_flags to set appropriate DEFAULT_VECTFLAGS for a given target (e.g., add -mfpu=neon for arm-linux-gnueabi). Unfortunately, these flags are overwritten by dg-options directive, which can cause tests to fail. Behavior of dg-options is documented in vect.exp files, but not all developers look at the .exp file when adding a new testcase. This caused a few dg-options directives to be used instead of the more appropriate dg-additional-options. This patch changes target-independent dg-options into dg-additional-options. This patch does not touch target-specific dg-options and target-specific tests to avoid disturbing the gentle balance of target-specific vectorization. This patch also removes a couple of unneeded "dg-do run" directives to avoid failures on compile-only targets. Default action is, again, set by check_vect_support_and_set_flags. Lastly, I avoided renaming tests that use -O options to O-* filename format because this support is not consistent between gcc.dg/vect/, g++.dg/vect/, and gfortran.dg/vect/ testsuites. It seems dg-additional-options is cleaner. This patch does the following, 1. do not change target-specific tests, e.g., gcc.dg/vect/costmodel/riscv/*; 2. do not change { dg-options FOO { target { target-*-pattern } } }; 3. do not remove { dg-do run { target { target-*-pattern } } }; 4. change { dg-options FOO } to { dg-additional-options FOO }; 5. remove { dg-do run } in several tests, where it is clearly not needed. gcc/testsuite/ChangeLog: PR testsuite/114307 * gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c: Remove dg-run. * gcc.dg/vect/complex/complex-operations-run.c: Likewise. * gcc.dg/vect/pr113576.c: Remove dg-run. Use dg-additional-options for test-specific flags. * gcc.dg/vect/gimplefe-40.c: Use dg-additional-options for test-specific flags. * gcc.dg/vect/gimplefe-41.c: Likewise. * gcc.dg/vect/pr101145inf.c: Likewise. * gcc.dg/vect/pr101145inf_1.c: Likewise. * gcc.dg/vect/pr108316.c: Likewise. * gcc.dg/vect/pr109011-1.c: Likewise. * gcc.dg/vect/pr109011-2.c: Likewise. * gcc.dg/vect/pr109011-3.c: Likewise. * gcc.dg/vect/pr109011-4.c: Likewise. * gcc.dg/vect/pr109011-5.c: Likewise. * gcc.dg/vect/pr111846.c: Likewise. * gcc.dg/vect/pr111860-2.c: Likewise. * gcc.dg/vect/pr111860-3.c: Likewise. * gcc.dg/vect/pr113002.c: Likewise. * gcc.dg/vect/pr84711.c: Likewise. * gcc.dg/vect/pr85597.c: Likewise. * gcc.dg/vect/pr88497-1.c: Likewise. * gcc.dg/vect/pr88497-2.c: Likewise. * gcc.dg/vect/pr88497-3.c: Likewise. * gcc.dg/vect/pr88497-4.c: Likewise. * gcc.dg/vect/pr88497-5.c: Likewise. * gcc.dg/vect/pr88497-7.c: Likewise. * gcc.dg/vect/pr92347.c: Likewise. * gcc.dg/vect/pr93069.c: Likewise. * gcc.dg/vect/pr97241.c: Likewise. * gcc.dg/vect/pr99102.c: Likewise. * gcc.dg/vect/vect-early-break_65.c: Likewise. * gcc.dg/vect/vect-fold-1.c: Likewise. * gcc.dg/vect/vect-ifcvt-19.c: Likewise. * gcc.dg/vect/vect-ifcvt-20.c: Likewise. * gcc.dg/vect/vect-reduc-epilogue-gaps.c: Likewise. * gcc.dg/vect/vect-singleton_1.c: Likewise. * g++.dg/vect/pr84556.cc: Likewise. * gfortran.dg/vect/fast-math-mgrid-resid.f: Likewise. * gfortran.dg/vect/pr77848.f: Likewise. * gfortran.dg/vect/pr90913.f90: Likewise. --- gcc/testsuite/g++.dg/vect/pr84556.cc | 2 +- gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c | 1 - gcc/testsuite/gcc.dg/vect/gimplefe-40.c | 2 +- gcc/testsuite/gcc.dg/vect/gimplefe-41.c | 2 +- gcc/testsuite/gcc.dg/vect/pr101145inf.c | 2 +- gcc/testsuite/gcc.dg/vect/pr101145inf_1.c | 2 +- gcc/testsuite/gcc.dg/vect/pr108316.c | 2 +- gcc/testsuite/gcc.dg/vect/pr109011-1.c | 2 +- gcc/testsuite/gcc.dg/vect/pr109011-2.c | 2 +- gcc/testsuite/gcc.dg/vect/pr109011-3.c | 2 +- gcc/testsuite/gcc.dg/vect/pr109011-4.c | 2 +- gcc/testsuite/gcc.dg/vect/pr109011-5.c | 2 +- gcc/testsuite/gcc.dg/vect/pr111846.c | 2 +- gcc/testsuite/gcc.dg/vect/pr111860-2.c | 2 +- gcc/testsuite/gcc.dg/vect/pr111860-3.c | 2 +- gcc/testsuite/gcc.dg/vect/pr113002.c | 2 +- gcc/testsuite/gcc.dg/vect/pr113576.c | 3 +-- gcc/testsuite/gcc.dg/vect/pr84711.c | 2 +- gcc/testsuite/gcc.dg/vect/pr85597.c | 2 +- gcc/testsuite/gcc.dg/vect/pr88497-1.c | 2 +- gcc/testsuite/gcc.dg/vect/pr88497-2.c | 2 +- gcc/testsuite/gcc.dg/vect/pr88497-3.c | 2 +- gcc/testsuite/gcc.dg/vect/pr88497-4.c | 2 +- gcc/testsuite/gcc.dg/vect/pr88497-5.c | 2 +- gcc/testsuite/gcc.dg/vect/pr88497-7.c | 2 +- gcc/testsuite/gcc.dg/vect/pr92347.c | 2 +- gcc/testsuite/gcc.dg/vect/pr93069.c | 2 +- gcc/testsuite/gcc.dg/vect/pr97241.c | 2 +- gcc/testsuite/gcc.dg/vect/pr99102.c | 2 +- .../gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c | 1 - gcc/testsuite/gcc.dg/vect/vect-early-break_65.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-fold-1.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-ifcvt-20.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-reduc-epilogue-gaps.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-singleton_1.c | 2 +- gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f | 2 +- gcc/testsuite/gfortran.dg/vect/pr77848.f | 2 +- gcc/testsuite/gfortran.dg/vect/pr90913.f90 | 2 +- 39 files changed, 37 insertions(+), 40 deletions(-) diff --git a/gcc/testsuite/g++.dg/vect/pr84556.cc b/gcc/testsuite/g++.dg/vect/pr84556.cc index e2c97e917be..6b1c9cec515 100644 --- a/gcc/testsuite/g++.dg/vect/pr84556.cc +++ b/gcc/testsuite/g++.dg/vect/pr84556.cc @@ -1,6 +1,6 @@ // PR c++/84556 // { dg-do run { target c++11 } } -// { dg-options "-O2 -fopenmp-simd" } +// { dg-additional-options "-O2 -fopenmp-simd" } // { dg-additional-options "-mavx" { target avx_runtime } } int diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c b/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c index 14ac512a8ef..5a68ff02951 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c +++ b/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c @@ -1,4 +1,3 @@ -/* { dg-do run } */ /* { dg-require-effective-target vect_complex_add_double } */ /* { dg-add-options arm_v8_3a_complex_neon } */ /* { dg-add-options arm_v8_3a_complex_neon } */ diff --git a/gcc/testsuite/gcc.dg/vect/gimplefe-40.c b/gcc/testsuite/gcc.dg/vect/gimplefe-40.c index 3c5bb4cf6e5..4e37a7980fc 100644 --- a/gcc/testsuite/gcc.dg/vect/gimplefe-40.c +++ b/gcc/testsuite/gcc.dg/vect/gimplefe-40.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { int128 && vect_float } } } */ -/* { dg-options "-fgimple -Wno-psabi -w" } */ +/* { dg-additional-options "-fgimple -Wno-psabi -w" } */ /* { dg-additional-options "-maltivec" { target { powerpc*-*-* && powerpc_altivec_ok } } } */ typedef float v4sf __attribute__((vector_size(16))); diff --git a/gcc/testsuite/gcc.dg/vect/gimplefe-41.c b/gcc/testsuite/gcc.dg/vect/gimplefe-41.c index e52a3a559a9..650bb2b5bd5 100644 --- a/gcc/testsuite/gcc.dg/vect/gimplefe-41.c +++ b/gcc/testsuite/gcc.dg/vect/gimplefe-41.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { vect_double && vect_long_long } } } */ -/* { dg-options "-fgimple -Wno-psabi -w" } */ +/* { dg-additional-options "-fgimple -Wno-psabi -w" } */ /* { dg-additional-options "-msse2" { target x86_64-*-* i?86-*-* } } */ typedef double __v2df __attribute__ ((__vector_size__ (16))); diff --git a/gcc/testsuite/gcc.dg/vect/pr101145inf.c b/gcc/testsuite/gcc.dg/vect/pr101145inf.c index ed49f5670b5..3ad8c1a2dd7 100644 --- a/gcc/testsuite/gcc.dg/vect/pr101145inf.c +++ b/gcc/testsuite/gcc.dg/vect/pr101145inf.c @@ -1,5 +1,5 @@ /* { dg-do run { target *-*-linux* *-*-gnu* *-*-uclinux* } } */ -/* { dg-options "-O3" } */ +/* { dg-additional-options "-O3" } */ #include #include "pr101145inf.inc" diff --git a/gcc/testsuite/gcc.dg/vect/pr101145inf_1.c b/gcc/testsuite/gcc.dg/vect/pr101145inf_1.c index 4ee3e31c7fe..e3e9dd46d10 100644 --- a/gcc/testsuite/gcc.dg/vect/pr101145inf_1.c +++ b/gcc/testsuite/gcc.dg/vect/pr101145inf_1.c @@ -1,5 +1,5 @@ /* { dg-do run { target *-*-linux* *-*-gnu* *-*-uclinux* } } */ -/* { dg-options "-O3" } */ +/* { dg-additional-options "-O3" } */ #include #include "pr101145inf.inc" diff --git a/gcc/testsuite/gcc.dg/vect/pr108316.c b/gcc/testsuite/gcc.dg/vect/pr108316.c index 540b7f2aed4..6888ae50d9e 100644 --- a/gcc/testsuite/gcc.dg/vect/pr108316.c +++ b/gcc/testsuite/gcc.dg/vect/pr108316.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-additional-options "-O3" } */ extern _Bool a[]; diff --git a/gcc/testsuite/gcc.dg/vect/pr109011-1.c b/gcc/testsuite/gcc.dg/vect/pr109011-1.c index 98362d6bc40..28f1288648b 100644 --- a/gcc/testsuite/gcc.dg/vect/pr109011-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr109011-1.c @@ -1,6 +1,6 @@ /* PR tree-optimization/109011 */ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ +/* { dg-additional-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ /* { dg-additional-options "-mavx512cd" { target { { i?86-*-* x86_64-*-* } && avx512cd } } } */ /* { dg-additional-options "-mavx512vpopcntdq" { target { { i?86-*-* x86_64-*-* } && avx512vpopcntdq } } } */ /* { dg-additional-options "-mvsx" { target { powerpc_vsx_ok && has_arch_pwr8 } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr109011-2.c b/gcc/testsuite/gcc.dg/vect/pr109011-2.c index a737e3fa03a..0219019edf1 100644 --- a/gcc/testsuite/gcc.dg/vect/pr109011-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr109011-2.c @@ -1,6 +1,6 @@ /* PR tree-optimization/109011 */ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ +/* { dg-additional-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ /* { dg-additional-options "-mavx512cd -mbmi -mlzcnt -mno-avx512vpopcntdq" { target { { { { i?86-*-* x86_64-*-* } && avx512cd } && lzcnt } && bmi } } } */ /* { dg-additional-options "-mvsx" { target { powerpc_vsx_ok && has_arch_pwr9 } } } */ /* { dg-additional-options "-mdejagnu-cpu=power9 -mvsx" { target { powerpc_vsx_ok && { ! has_arch_pwr9 } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr109011-3.c b/gcc/testsuite/gcc.dg/vect/pr109011-3.c index 21c364dfdfd..eda0d3aa978 100644 --- a/gcc/testsuite/gcc.dg/vect/pr109011-3.c +++ b/gcc/testsuite/gcc.dg/vect/pr109011-3.c @@ -1,6 +1,6 @@ /* PR tree-optimization/109011 */ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ +/* { dg-additional-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ /* { dg-additional-options "-mno-avx512cd -mbmi -mlzcnt -mavx512vpopcntdq" { target { { { { i?86-*-* x86_64-*-* } && avx512vpopcntdq } && lzcnt } && bmi } } } */ /* { dg-additional-options "-mdejagnu-cpu=power8 -mvsx" { target powerpc_vsx_ok } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr109011-4.c b/gcc/testsuite/gcc.dg/vect/pr109011-4.c index 76af7884224..da7810d62b5 100644 --- a/gcc/testsuite/gcc.dg/vect/pr109011-4.c +++ b/gcc/testsuite/gcc.dg/vect/pr109011-4.c @@ -1,6 +1,6 @@ /* PR tree-optimization/109011 */ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ +/* { dg-additional-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ /* { dg-additional-options "-mavx512cd -mbmi -mlzcnt -mno-avx512vpopcntdq" { target { { { { i?86-*-* x86_64-*-* } && avx512cd } && lzcnt } && bmi } } } */ /* { dg-additional-options "-mvsx" { target { powerpc_vsx_ok && has_arch_pwr9 } } } */ /* { dg-additional-options "-mdejagnu-cpu=power9 -mvsx" { target { powerpc_vsx_ok && { ! has_arch_pwr9 } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr109011-5.c b/gcc/testsuite/gcc.dg/vect/pr109011-5.c index 19dbfb3356a..f2119aebcfd 100644 --- a/gcc/testsuite/gcc.dg/vect/pr109011-5.c +++ b/gcc/testsuite/gcc.dg/vect/pr109011-5.c @@ -1,6 +1,6 @@ /* PR tree-optimization/109011 */ /* { dg-do compile } */ -/* { dg-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ +/* { dg-additional-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */ /* { dg-additional-options "-mno-avx512cd -mbmi -mlzcnt -mavx512vpopcntdq" { target { { { { i?86-*-* x86_64-*-* } && avx512vpopcntdq } && lzcnt } && bmi } } } */ /* { dg-additional-options "-mdejagnu-cpu=power8 -mvsx" { target powerpc_vsx_ok } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr111846.c b/gcc/testsuite/gcc.dg/vect/pr111846.c index d283882f261..c4d1da6d22b 100644 --- a/gcc/testsuite/gcc.dg/vect/pr111846.c +++ b/gcc/testsuite/gcc.dg/vect/pr111846.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -ffast-math" } */ +/* { dg-additional-options "-O3 -ffast-math" } */ /* { dg-additional-options "-mavx2" { target { x86_64-*-* i?86-*-* } } } */ extern __attribute__((__simd__)) float powf(float, float); diff --git a/gcc/testsuite/gcc.dg/vect/pr111860-2.c b/gcc/testsuite/gcc.dg/vect/pr111860-2.c index 07f64ffb531..e205d2c3c9f 100644 --- a/gcc/testsuite/gcc.dg/vect/pr111860-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr111860-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fno-tree-sink -ftree-vectorize" } */ +/* { dg-additional-options "-O -fno-tree-sink -ftree-vectorize" } */ int buffer_ctrl_ctx_0, buffer_ctrl_p1, buffer_ctrl_cmd; int diff --git a/gcc/testsuite/gcc.dg/vect/pr111860-3.c b/gcc/testsuite/gcc.dg/vect/pr111860-3.c index 07f64ffb531..e205d2c3c9f 100644 --- a/gcc/testsuite/gcc.dg/vect/pr111860-3.c +++ b/gcc/testsuite/gcc.dg/vect/pr111860-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fno-tree-sink -ftree-vectorize" } */ +/* { dg-additional-options "-O -fno-tree-sink -ftree-vectorize" } */ int buffer_ctrl_ctx_0, buffer_ctrl_p1, buffer_ctrl_cmd; int diff --git a/gcc/testsuite/gcc.dg/vect/pr113002.c b/gcc/testsuite/gcc.dg/vect/pr113002.c index 186710f64b4..ad6e5835985 100644 --- a/gcc/testsuite/gcc.dg/vect/pr113002.c +++ b/gcc/testsuite/gcc.dg/vect/pr113002.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target int128 } */ -/* { dg-options "-finline-stringops -Os" } */ +/* { dg-additional-options "-finline-stringops -Os" } */ typedef __int128 v64u128 __attribute__((vector_size(64))); int c; diff --git a/gcc/testsuite/gcc.dg/vect/pr113576.c b/gcc/testsuite/gcc.dg/vect/pr113576.c index b6edde6f8e2..ba171b7c1f2 100644 --- a/gcc/testsuite/gcc.dg/vect/pr113576.c +++ b/gcc/testsuite/gcc.dg/vect/pr113576.c @@ -1,5 +1,4 @@ -/* { dg-do run } */ -/* { dg-options "-O3" } */ +/* { dg-additional-options "-O3" } */ /* { dg-additional-options "-march=skylake-avx512" { target avx512f } } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/pr84711.c b/gcc/testsuite/gcc.dg/vect/pr84711.c index 12e9f60114a..350f9010be7 100644 --- a/gcc/testsuite/gcc.dg/vect/pr84711.c +++ b/gcc/testsuite/gcc.dg/vect/pr84711.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ -/* { dg-options "-O2 -Wno-psabi" } */ +/* { dg-additional-options "-O2 -Wno-psabi" } */ /* { dg-additional-options "-msse" { target i?86-*-* x86_64-*-* } } */ typedef int v4si diff --git a/gcc/testsuite/gcc.dg/vect/pr85597.c b/gcc/testsuite/gcc.dg/vect/pr85597.c index cf615f9c464..71cc3615d63 100644 --- a/gcc/testsuite/gcc.dg/vect/pr85597.c +++ b/gcc/testsuite/gcc.dg/vect/pr85597.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-additional-options "-O3" } */ /* { dg-additional-options "-mfma" { target { x86_64-*-* i?86-*-* } } } */ extern double fma (double, double, double); diff --git a/gcc/testsuite/gcc.dg/vect/pr88497-1.c b/gcc/testsuite/gcc.dg/vect/pr88497-1.c index 885ec709428..8f9a14af1d3 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88497-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr88497-1.c @@ -1,7 +1,7 @@ /* { dg-require-effective-target vect_double } */ /* { dg-require-effective-target vsx_hw { target { powerpc*-*-* } } } */ /* { dg-require-effective-target sse2_runtime { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ +/* { dg-additional-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ /* { dg-additional-options "-mvsx" { target { powerpc*-*-* } } } */ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr88497-2.c b/gcc/testsuite/gcc.dg/vect/pr88497-2.c index 8da5920903c..34528ce9aa4 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88497-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr88497-2.c @@ -2,7 +2,7 @@ /* { dg-require-effective-target vect_float } */ /* { dg-require-effective-target powerpc_altivec_ok { target { powerpc*-*-* } } } */ /* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ +/* { dg-additional-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ /* { dg-additional-options "-maltivec" { target { powerpc*-*-* } } } */ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr88497-3.c b/gcc/testsuite/gcc.dg/vect/pr88497-3.c index 449f282e85c..1489dbcc59a 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88497-3.c +++ b/gcc/testsuite/gcc.dg/vect/pr88497-3.c @@ -2,7 +2,7 @@ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target powerpc_altivec_ok { target { powerpc*-*-* } } } */ /* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ +/* { dg-additional-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ /* { dg-additional-options "-maltivec" { target { powerpc*-*-* } } } */ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr88497-4.c b/gcc/testsuite/gcc.dg/vect/pr88497-4.c index f7b6c91c911..e7b20509cbb 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88497-4.c +++ b/gcc/testsuite/gcc.dg/vect/pr88497-4.c @@ -2,7 +2,7 @@ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target powerpc_altivec_ok { target { powerpc*-*-* } } } */ /* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ +/* { dg-additional-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ /* { dg-additional-options "-maltivec" { target { powerpc*-*-* } } } */ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr88497-5.c b/gcc/testsuite/gcc.dg/vect/pr88497-5.c index cbd12241c76..c3e34c22962 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88497-5.c +++ b/gcc/testsuite/gcc.dg/vect/pr88497-5.c @@ -2,7 +2,7 @@ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target powerpc_altivec_ok { target { powerpc*-*-* } } } */ /* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ +/* { dg-additional-options "-O2 -ffast-math -fdump-tree-reassoc1" } */ /* { dg-additional-options "-maltivec" { target { powerpc*-*-* } } } */ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr88497-7.c b/gcc/testsuite/gcc.dg/vect/pr88497-7.c index d20ed71284e..e94907b3426 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88497-7.c +++ b/gcc/testsuite/gcc.dg/vect/pr88497-7.c @@ -1,5 +1,5 @@ /* { dg-require-effective-target avx512f_runtime } */ -/* { dg-options "-O2 -mavx512f -ffast-math -fdump-tree-reassoc1" } */ +/* { dg-additional-options "-O2 -mavx512f -ffast-math -fdump-tree-reassoc1" } */ /* To test reassoc can undistribute vector bit_field_ref on multiple vector machine modes, bypass those modes with only one candidate. diff --git a/gcc/testsuite/gcc.dg/vect/pr92347.c b/gcc/testsuite/gcc.dg/vect/pr92347.c index f75b2596a26..13d16551b5c 100644 --- a/gcc/testsuite/gcc.dg/vect/pr92347.c +++ b/gcc/testsuite/gcc.dg/vect/pr92347.c @@ -1,6 +1,6 @@ /* Copied from PR 92347. */ /* { dg-do compile } */ -/* { dg-options "-O1 -fopenmp-simd" } */ +/* { dg-additional-options "-O1 -fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target { i?86-*-* x86_64-*-* } } } */ int by; diff --git a/gcc/testsuite/gcc.dg/vect/pr93069.c b/gcc/testsuite/gcc.dg/vect/pr93069.c index 45c740dbe9e..a46fa437aa9 100644 --- a/gcc/testsuite/gcc.dg/vect/pr93069.c +++ b/gcc/testsuite/gcc.dg/vect/pr93069.c @@ -1,6 +1,6 @@ /* PR target/93069 */ /* { dg-do assemble { target vect_simd_clones } } */ -/* { dg-options "-O2 -fopenmp-simd" } */ +/* { dg-additional-options "-O2 -fopenmp-simd" } */ #pragma omp declare simd int diff --git a/gcc/testsuite/gcc.dg/vect/pr97241.c b/gcc/testsuite/gcc.dg/vect/pr97241.c index d4be8f60940..f9b3d6d8337 100644 --- a/gcc/testsuite/gcc.dg/vect/pr97241.c +++ b/gcc/testsuite/gcc.dg/vect/pr97241.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 --param max-loop-header-insns=2" } */ +/* { dg-additional-options "-O3 --param max-loop-header-insns=2" } */ short int *ev; int l4; diff --git a/gcc/testsuite/gcc.dg/vect/pr99102.c b/gcc/testsuite/gcc.dg/vect/pr99102.c index 0d030d15c86..071741f5e48 100644 --- a/gcc/testsuite/gcc.dg/vect/pr99102.c +++ b/gcc/testsuite/gcc.dg/vect/pr99102.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */ +/* { dg-additional-options "-O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */ /* { dg-additional-options "-msve-vector-bits=256" { target aarch64_sve256_hw } } */ long a[44]; short d, e = -7; diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c index 7b46e7d8a2a..155ce477103 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c +++ b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c @@ -1,5 +1,4 @@ /* Make sure a -0 stays -0 when we perform a conditional reduction. */ -/* { dg-do run } */ /* { dg-require-effective-target vect_double } */ /* { dg-add-options ieee } */ /* { dg-additional-options "-std=gnu99 -fno-fast-math" } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c index 23a8341b529..fa87999dcd4 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c @@ -2,7 +2,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_early_break } */ /* { dg-require-effective-target vect_int } */ -/* { dg-options "-Ofast -fno-vect-cost-model -fdump-tree-vect-details" } */ +/* { dg-additional-options "-Ofast -fno-vect-cost-model -fdump-tree-vect-details" } */ enum a { b }; diff --git a/gcc/testsuite/gcc.dg/vect/vect-fold-1.c b/gcc/testsuite/gcc.dg/vect/vect-fold-1.c index 2bd21a47a0b..cc1349e7d78 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fold-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fold-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-ccp1" } */ +/* { dg-additional-options "-O2 -fdump-tree-ccp1" } */ typedef unsigned char v4qi __attribute__ ((vector_size (4))); diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c index b10147298d3..27cc5427f88 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fgimple -Ofast -fdump-tree-ifcvt-raw" } */ +/* { dg-additional-options "-fgimple -Ofast -fdump-tree-ifcvt-raw" } */ void __GIMPLE (ssa,guessed_local(10737414), startwith ("fix_loops")) foo (int * f, int d, int e) diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-20.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-20.c index 96c5f5a9293..0a4a8087d2c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-20.c +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fgimple -fopenmp-simd -Ofast -fdump-tree-ifcvt-raw" } */ +/* { dg-additional-options "-fgimple -fopenmp-simd -Ofast -fdump-tree-ifcvt-raw" } */ void foo (int * restrict p, int * restrict q, int * restrict r, int * restrict s, int * restrict t, int * restrict u) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-epilogue-gaps.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-epilogue-gaps.c index dc5704f5607..5e7bfd5d81d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-epilogue-gaps.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-epilogue-gaps.c @@ -1,4 +1,4 @@ -/* { dg-options "-O3 -fno-vect-cost-model" } */ +/* { dg-additional-options "-O3 -fno-vect-cost-model" } */ struct { float real; float img; diff --git a/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c b/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c index 6c2ff49cdab..bd243f805b7 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c @@ -1,7 +1,7 @@ /* PR target/59843 ICE on function taking/returning vector of one float64_t. */ /* { dg-do compile } */ -/* { dg-options "-Warray-bounds -O2 -fno-inline -std=c99" } */ +/* { dg-additional-options "-Warray-bounds -O2 -fno-inline -std=c99" } */ #define TEST(BASETYPE, VECTYPE, SUFFIX) \ typedef BASETYPE VECTYPE \ diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f index 97b88821731..2e548748296 100644 --- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f +++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f @@ -1,6 +1,6 @@ ! { dg-do compile } ! { dg-require-effective-target vect_double } -! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" } +! { dg-additional-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" } ! { dg-additional-options "-mprefer-avx128" { target { i?86-*-* x86_64-*-* } } } ! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } ! { dg-additional-options "-mzarch" { target { s390*-*-* } } } diff --git a/gcc/testsuite/gfortran.dg/vect/pr77848.f b/gcc/testsuite/gfortran.dg/vect/pr77848.f index 4752205f5d2..2a5e5bfea54 100644 --- a/gcc/testsuite/gfortran.dg/vect/pr77848.f +++ b/gcc/testsuite/gfortran.dg/vect/pr77848.f @@ -1,6 +1,6 @@ ! PR 77848: Verify versioning is on when vectorization fails ! { dg-do compile } -! { dg-options "-O3 -ffast-math -fdump-tree-ifcvt -fdump-tree-vect-details" } +! { dg-additional-options "-O3 -ffast-math -fdump-tree-ifcvt -fdump-tree-vect-details" } ! { dg-additional-options "-mzarch" { target { s390*-*-* } } } subroutine sub(x,a,n,m) diff --git a/gcc/testsuite/gfortran.dg/vect/pr90913.f90 b/gcc/testsuite/gfortran.dg/vect/pr90913.f90 index d0f225159cc..1529cee3757 100644 --- a/gcc/testsuite/gfortran.dg/vect/pr90913.f90 +++ b/gcc/testsuite/gfortran.dg/vect/pr90913.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O3 -ffast-math" } +! { dg-additional-options "-O3 -ffast-math" } ! { dg-additional-options "-mavx -mveclibabi=svml" { target i?86-*-* x86_64-*-* } } subroutine foo (a, b, c, d, e, f, g, h, k, l) implicit none