From: Jonathan Gray <[email protected]> This patch was originally sent to mesa but it applies to pixman as well.
Change the __m128i variables to be volatile so gcc 4.9 won't optimize all of them out with -O1 or greater. The _mm_set1_epi32/pinsrd calls still get optimized out but now there is at least one SSE2/SSSE3 instruction generated via _mm_max_epu32/pmaxud. When all of the SSE2/SSSE3 instructions got optimized out the configure test would incorrectly pass when the compiler supported the intrinsics and the assembler didn't support the instructions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806 Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Oded Gabbay <[email protected]> --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 3a66909..6323b98 100644 --- a/configure.ac +++ b/configure.ac @@ -430,7 +430,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include <xmmintrin.h> #include <emmintrin.h> int main () { - __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c; + volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c; c = _mm_xor_si128 (a, b); return 0; }]])], have_sse2_intrinsics=yes) @@ -474,7 +474,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include <emmintrin.h> #include <tmmintrin.h> int main () { - __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c; + volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c; c = _mm_maddubs_epi16 (a, b); return 0; }]])], have_ssse3_intrinsics=yes) -- 2.5.0 _______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
