2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr72867.c
blobba8282f9d72c82bc07897e927ccfafd56c27b325
1 /* PR target/72867 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -msse" } */
4 /* { dg-require-effective-target sse } */
6 #include "sse-check.h"
7 #include <xmmintrin.h>
9 static void
10 sse_test (void)
12 float nan = __builtin_nanf ("");
14 __m128 x = _mm_min_ps(_mm_set1_ps(nan), _mm_set1_ps(1.0f));
16 if (x[0] != 1.0f)
17 abort ();
19 x = _mm_min_ps(_mm_set1_ps(1.f), _mm_set1_ps(nan));
21 if (!__builtin_isnan (x[0]))
22 abort ();