c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-cmp-float.c
blob6bee9bc656a197d2dc68f7c158e83454ad2be349
1 /* Verify that overloaded built-ins for vec_cmp with float
2 inputs for VSX produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-options "-mvsx -O2" } */
6 /* { dg-require-effective-target powerpc_vsx } */
8 #include <altivec.h>
10 vector bool int
11 test1_eq (vector float x, vector float y)
13 return vec_cmpeq (x, y);
16 vector bool int
17 test1_ge (vector float x, vector float y)
19 return vec_cmpge (x, y);
22 vector bool int
23 test1_gt (vector float x, vector float y)
25 return vec_cmpgt (x, y);
28 vector bool int
29 test1_le (vector float x, vector float y)
31 return vec_cmple (x, y);
34 vector bool int
35 test1_lt (vector float x, vector float y)
37 return vec_cmplt (x, y);
40 vector bool int
41 test1_ne (vector float x, vector float y)
43 return vec_cmpne (x, y);
46 /* { dg-final { scan-assembler-times "xvcmpeqsp" 2 } } */
47 /* { dg-final { scan-assembler-times "xvcmpgtsp" 2 } } */
48 /* { dg-final { scan-assembler-times "xvcmpnesp" 0 } } */
49 /* { dg-final { scan-assembler-times "xvcmpgesp" 2 } } */
50 /* { dg-final { scan-assembler-times "fcmpu" 0 } } */