Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-cmp-double.c
blob9d56862b2eafc120330f9168752a2a282db0f7ce
1 /* Verify that overloaded built-ins for vec_cmp with
2 double inputs for VSX produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
8 #include <altivec.h>
10 vector bool long long
11 test2_eq (vector double x, vector double y)
13 return vec_cmpeq (x, y);
16 vector bool long long
17 test2_ge (vector double x, vector double y)
19 return vec_cmpge (x, y);
22 vector bool long long
23 test2_gt (vector double x, vector double y)
25 return vec_cmpgt (x, y);
28 vector bool long long
29 test2_le (vector double x, vector double y)
31 return vec_cmple (x, y);
34 vector bool long long
35 test2_lt (vector double x, vector double y)
37 return vec_cmplt (x, y);
40 vector bool long long
41 test2_ne (vector double x, vector double y)
43 return vec_cmpne (x, y);
46 /* { dg-final { scan-assembler-times "xvcmpeqdp" 2 } } */
47 /* { dg-final { scan-assembler-times "xvcmpgtdp" 2 } } */
48 /* { dg-final { scan-assembler-times "xvcmpnedp" 0 } } */
49 /* { dg-final { scan-assembler-times "xvcmpgedp" 2 } } */
50 /* { dg-final { scan-assembler-times "fcmpu" 0 } } */