From: Rainer Orth Date: Fri, 12 Jan 2018 15:57:40 +0000 (+0000) Subject: Guard against incomplete AVX512F support in Solaris as X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38081436e5f140e391668f265e0b0705983187d4;p=gcc.git Guard against incomplete AVX512F support in Solaris as * 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 41eef263a03..e9617740193 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-01-12 Rainer Orth + + * 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 PR target/83629 diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 5f280b34545..57e23a91676 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -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 { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index e89bd47b74c..8ad34357685 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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" ] }