re PR testsuite/82847 (gcc.dg/vect/slp-perm-9.c fail)
authorRichard Biener <rguenther@suse.de>
Tue, 27 Mar 2018 13:26:04 +0000 (13:26 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 27 Mar 2018 13:26:04 +0000 (13:26 +0000)
2018-03-27  Richard Biener  <rguenther@suse.de>

PR testsuite/82847
* lib/target-supports.exp (check_ssse3_available): New function.
(check_effective_target_vect_perm_short): Enable for x86 if
check_ssse3_available.

From-SVN: r258882

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 06d08aaa5389d17c5dfda4d2532202ea322b31a0..00f16535f22911f1405526100fe77daf8e1d7675 100644 (file)
@@ -1,3 +1,10 @@
+2018-03-27  Richard Biener  <rguenther@suse.de>
+
+       PR testsuite/82847
+       * lib/target-supports.exp (check_ssse3_available): New function.
+       (check_effective_target_vect_perm_short): Enable for x86 if
+       check_ssse3_available.
+
 2018-03-27  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/85082
index 55e726909d5eb8e5b0d129387265fe90c1eeec72..3bd2142f6e7d43c5b17719d58a0866b9e9650926 100644 (file)
@@ -5828,6 +5828,8 @@ proc check_effective_target_vect_perm_short { } {
                 && ![check_effective_target_vect_variable_length])
             || [istarget powerpc*-*-*]
             || [istarget spu-*-*]
+            || (([istarget i?86-*-*] || [istarget x86_64-*-*]
+                && [check_ssse3_available]))
             || ([istarget mips*-*-*]
                  && [et-is-effective-target mips_msa])
             || ([istarget s390*-*-*]
@@ -8017,6 +8019,19 @@ proc check_avx_available { } {
   return 0;
 }
 
+# Return true if we are compiling for SSSE3 target.
+
+proc check_ssse3_available { } {
+  if { [check_no_compiler_messages sse3a_available assembly {
+    #ifndef __SSSE3__
+    #error unsupported
+    #endif
+  } ""] } {
+    return 1;
+  }
+  return 0;
+}
+
 # Return true if 32- and 16-bytes vectors are available.
 
 proc check_effective_target_vect_sizes_32B_16B { } {