The following attempts to fix PR82847 by introducing a check whether
ssse3 is available and enable vect_perm_short if so.  Somewhat of
a kludge but I can't think of anything better right now.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2018-03-27  Richard Biener  <rguent...@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.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp       (revision 258871)
+++ gcc/testsuite/lib/target-supports.exp       (working copy)
@@ -5828,6 +5828,8 @@ proc check_effective_target_vect_perm_sh
                 && ![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*-*-*]
@@ -8012,6 +8014,19 @@ proc check_avx_available { } {
     #error unsupported
     #endif
   } ""] } {
+    return 1;
+  }
+  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;

Reply via email to