Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / intrinsics_opt-2.c
blob56be74b7e56ff190f89d76b93a36231805f3801f
1 /* { dg-do compile } */
2 /* { dg-options "-O -ffast-math -msse2 -fdump-tree-optimized" } */
4 #include <emmintrin.h>
6 int f(__m128d x){
7 x = _mm_sub_pd (x, x);
8 x = _mm_mul_pd (x, x);
9 double r = 42;
10 _mm_storeh_pd (&r, x);
11 int z = r == 0;
12 return __builtin_constant_p (z) && z;
15 /* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
16 /* { dg-final { cleanup-tree-dump "optimized" } } */