public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <oliva@adacore.com>
To: gcc-patches@gcc.gnu.org
Subject: [RFC] decay vect tests from run to link for pr95401
Date: Thu, 11 Mar 2021 04:38:06 -0300	[thread overview]
Message-ID: <or7dmeb0o1.fsf@lxoliva.fsfla.org> (raw)


When vect.exp finds our configuration disables altivec by default, it
disables the execution of vectorization tests, assuming the test
hardware doesn't support it.

Tests become just compile tests, but compile tests won't work
correctly when additional sources are named, e.g. pr95401.cc, because
GCC refuses to compile multiple files into the same asm output.

With this patch, the default for when execution is not possible
becomes link.


This was regstrapped on x86_64-linux-gnu and ppc64-linux-gnu, and tested
with a cross to a ppc64-vxworks7r2 with altivec disabled by default.  I
found fixing the handling of additional sources to e.g. compile each one
separately, or perhaps just discard or reject additional sources for
compile tests, to be a little too involved.

So I'm leaning towards this proposed change, just extended to other
platforms that also decay from run to compile rather than link, and thus
run into this problem in g++.dg/vect/pr95401.cc.  Would this be
acceptable?


for  gcc/testsuite/ChangeLog

	* lib/target-supports.exp (check_vect_support_and_set_flags):
	Decay to link rather than compile.
---
 gcc/testsuite/lib/target-supports.exp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 52d3d036d3c5c..23d532fb2b963 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9656,7 +9656,7 @@ proc check_vect_support_and_set_flags { } {
                 # Specify a cpu that supports VMX for compile-only tests.
                 lappend DEFAULT_VECTCFLAGS "-mcpu=970"
             }
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
         lappend DEFAULT_VECTCFLAGS "-msse2"

-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

             reply	other threads:[~2021-03-11  7:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  7:38 Alexandre Oliva [this message]
2021-03-11  9:48 ` Richard Biener
2021-03-11 12:17   ` Richard Sandiford
2021-03-11 14:47   ` Alexandre Oliva
2021-03-12  7:42     ` Richard Biener
2024-04-22 10:05   ` [PATCH] " Alexandre Oliva
2024-04-22 19:10     ` Richard Biener
2024-04-29 23:30       ` Alexandre Oliva
2024-04-30 12:39         ` Christophe Lyon
2024-05-23 13:28           ` [PATCH] [testsuite] conditionalize dg-additional-sources on target and type Alexandre Oliva
2024-05-23 13:42             ` Christophe Lyon
2024-05-29 20:11             ` Mike Stump

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=or7dmeb0o1.fsf@lxoliva.fsfla.org \
    --to=oliva@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).