public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC] decay vect tests from run to link for pr95401
@ 2021-03-11  7:38 Alexandre Oliva
  2021-03-11  9:48 ` Richard Biener
  0 siblings, 1 reply; 12+ messages in thread
From: Alexandre Oliva @ 2021-03-11  7:38 UTC (permalink / raw)
  To: gcc-patches


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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-05-29 20:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  7:38 [RFC] decay vect tests from run to link for pr95401 Alexandre Oliva
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

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).