This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix check_effective_target_avx512f
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Jan 2014 01:05:05 +0100
- Subject: [PATCH] Fix check_effective_target_avx512f
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
I've noticed that all abi-avx512f.exp tests fail when the assembler doesn't
support avx512f. The problem is that the builtin has been optimized away
as unused and thus it passed even with assembler that doesn't support EVEX.
Fixed thusly, tested on x86_64-linux, committed to trunk as obvious.
Happy New Year to everyone!
2014-01-01 Jakub Jelinek <jakub@redhat.com>
* lib/target-supports.exp (check_effective_target_avx512f): Make sure
the builtin isn't optimized away as unused.
--- gcc/testsuite/lib/target-supports.exp.jj 2013-12-31 12:51:09.000000000 +0100
+++ gcc/testsuite/lib/target-supports.exp 2014-01-01 01:00:28.086093259 +0100
@@ -5176,9 +5176,9 @@ proc check_effective_target_avx512f { }
return [check_no_compiler_messages avx512f object {
typedef double __m512d __attribute__ ((__vector_size__ (64)));
- void _mm512_add (__m512d a)
+ __m512d _mm512_add (__m512d a)
{
- __builtin_ia32_addpd512_mask (a, a, a, 1, 4);
+ return __builtin_ia32_addpd512_mask (a, a, a, 1, 4);
}
} "-O2 -mavx512f" ]
}
Jakub