summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/target-supports.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r--gcc/testsuite/lib/target-supports.exp13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 3fe71d74147..9a5e024fd54 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5170,6 +5170,19 @@ proc check_prefer_avx128 { } {
}
+# Return 1 if avx512f instructions can be compiled.
+
+proc check_effective_target_avx512f { } {
+ return [check_no_compiler_messages avx512f object {
+ typedef double __m512d __attribute__ ((__vector_size__ (64)));
+
+ void _mm512_add (__m512d a)
+ {
+ __builtin_ia32_addpd512_mask (a, a, a, 1, 4);
+ }
+ } "-O2 -mavx512f" ]
+}
+
# Return 1 if avx instructions can be compiled.
proc check_effective_target_avx { } {