On Tue, Dec 8, 2015 at 9:37 PM, Jonathan Gray <j...@jsg.id.au> wrote: > Change the __m128i variables to be volatile so gcc 4.9 won't optimise > all of them out with -O1 or greater. The _mm_set1_epi32/pinsrd calls > still get optimised out but now there is at least one SSE4.1 instruction > generated via _mm_max_epu32/pmaxud. When all of the sse4.1 instructions > got optimised 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 <j...@jsg.id.au> > Cc: "11.0 11.1" <mesa-sta...@lists.freedesktop.org> > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 260934d..1d82e47 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -384,7 +384,7 @@ CFLAGS="$SSE41_CFLAGS $CFLAGS" > AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ > #include <smmintrin.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_max_epu32(a, b); > return 0;
I would have extracted an int from the result of _mm_max_epu32 and returned that instead of 0. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev