Guard against incomplete AVX512F support in Solaris as
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Fri, 12 Jan 2018 15:57:40 +0000 (15:57 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Fri, 12 Jan 2018 15:57:40 +0000 (15:57 +0000)
* lib/target-supports.exp (check_effective_target_avx512f): Also
check for __builtin_ia32_addsd_round,
__builtin_ia32_getmantsd_round.
* gcc.target/i386/i386.exp (check_effective_target_avx512f):
Remove.

From-SVN: r256588

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

index 41eef263a0306bf660f39cde6f6ea62d0e9df25b..e9617740193ab00546b19d2f5920332c41f09ce9 100644 (file)
@@ -1,3 +1,11 @@
+2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * lib/target-supports.exp (check_effective_target_avx512f): Also
+       check for __builtin_ia32_addsd_round,
+       __builtin_ia32_getmantsd_round.
+       * gcc.target/i386/i386.exp (check_effective_target_avx512f):
+       Remove.
+
 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
 
        PR target/83629
index 5f280b34545b1c6be195b49d9ac62f3dbb57f981..57e23a91676c59ee6ccd6951f002fadc923e4a1a 100644 (file)
@@ -230,18 +230,6 @@ proc check_effective_target_rtm { } {
     } "-mrtm" ]
 }
 
-# Return 1 if avx512f instructions can be compiled.
-proc check_effective_target_avx512f { } {
-    return [check_no_compiler_messages avx512f object {
-       typedef long long __v8di __attribute__ ((__vector_size__ (64)));
-       __v8di
-       mm512_and_epi64  (__v8di __X, __v8di __Y)
-       {
-            return __builtin_ia32_pandq512_mask (__X, __Y, __X, -1);
-       }
-    } "-mavx512f" ]
-}
-
 # Return 1 if avx512vl instructions can be compiled.
 proc check_effective_target_avx512vl { } {
     return [check_no_compiler_messages avx512vl object {
index e89bd47b74c8d5871ecda095894ca18aff0e7322..8ad34357685bf10bdcf19aab9accd99dffc92325 100644 (file)
@@ -7918,11 +7918,22 @@ proc check_prefer_avx128 { } {
 proc check_effective_target_avx512f { } {
     return [check_no_compiler_messages avx512f object {
        typedef double __m512d __attribute__ ((__vector_size__ (64)));
+       typedef double __m128d __attribute__ ((__vector_size__ (16)));
 
        __m512d _mm512_add (__m512d a)
        {
          return __builtin_ia32_addpd512_mask (a, a, a, 1, 4);
        }
+
+       __m128d _mm128_add (__m128d a)
+       {
+         return __builtin_ia32_addsd_round (a, a, 8);
+       }
+
+       __m128d _mm128_getmant (__m128d a)
+       {
+         return __builtin_ia32_getmantsd_round (a, a, 0, 8);
+       }
     } "-O2 -mavx512f" ]
 }