[gcc(refs/users/aoliva/heads/testme)] decay vect tests from run to link for pr95401

Alexandre Oliva aoliva@gcc.gnu.org
Thu Mar 23 03:47:28 GMT 2023


https://gcc.gnu.org/g:e3e240df034f6ac49cca77fcd70cafd5c7cf28fa

commit e3e240df034f6ac49cca77fcd70cafd5c7cf28fa
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Mar 23 00:44:29 2023 -0300

    decay vect tests from run to link for pr95401
    
    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.
    
    
    for  gcc/testsuite/ChangeLog
    
            * lib/target-supports.exp (check_vect_support_and_set_flags):
            Decay to link rather than compile.

Diff:
---
 gcc/testsuite/lib/target-supports.exp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index f971c320dfe..d7d3c2b6f9b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -10761,7 +10761,7 @@ proc check_vect_support_and_set_flags { } {
         if [check_750cl_hw_available] {
             set dg-do-what-default run
         } else {
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif [istarget powerpc*-*-*] {
         # Skip targets not supporting -maltivec.
@@ -10785,14 +10785,14 @@ 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"
         if { [check_effective_target_sse2_runtime] } {
             set dg-do-what-default run
         } else {
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif { [istarget mips*-*-*]
 	       && [check_effective_target_nomips16] } {
@@ -10811,7 +10811,7 @@ proc check_vect_support_and_set_flags { } {
         if [check_effective_target_ultrasparc_hw] {
             set dg-do-what-default run
         } else {
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif [istarget alpha*-*-*] {
         # Alpha's vectorization capabilities are extremely limited.
@@ -10824,7 +10824,7 @@ proc check_vect_support_and_set_flags { } {
         if [check_alpha_max_hw_available] {
             set dg-do-what-default run
         } else {
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif [istarget ia64-*-*] {
         set dg-do-what-default run
@@ -10837,7 +10837,7 @@ proc check_vect_support_and_set_flags { } {
         if [is-effective-target arm_neon_hw] {
             set dg-do-what-default run
         } else {
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif [istarget "aarch64*-*-*"] {
         set dg-do-what-default run
@@ -10861,7 +10861,7 @@ proc check_vect_support_and_set_flags { } {
             set dg-do-what-default run
         } else {
 	    lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch"
-            set dg-do-what-default compile
+            set dg-do-what-default link
         }
     } elseif [istarget amdgcn-*-*] {
         set dg-do-what-default run


More information about the Gcc-cvs mailing list