Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-cmp-int.h
blob0da58e0e0a9cd2aa4be0e0f577464087185647de
1 /* Verify that overloaded built-ins for vec_cmp with int
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_p8vector_ok } */
6 /* { dg-options "-mpower8-vector -O2" } */
8 #include <altivec.h>
10 vector bool int
11 test3_eq (vector signed int x, vector signed int y)
13 return vec_cmpeq (x, y);
16 vector bool int
17 test6_eq (vector unsigned int x, vector unsigned int y)
19 return vec_cmpeq (x, y);
22 vector bool int
23 test3_ge (vector signed int x, vector signed int y)
25 return vec_cmpge (x, y);
28 vector bool int
29 test6_ge (vector unsigned int x, vector unsigned int y)
31 return vec_cmpge (x, y);
34 vector bool int
35 test3_gt (vector signed int x, vector signed int y)
37 return vec_cmpgt (x, y);
40 vector bool int
41 test6_gt (vector unsigned int x, vector unsigned int y)
43 return vec_cmpgt (x, y);
46 vector bool int
47 test3_le (vector signed int x, vector signed int y)
49 return vec_cmple (x, y);
52 vector bool int
53 test6_le (vector unsigned int x, vector unsigned int y)
55 return vec_cmple (x, y);
58 vector bool int
59 test3_lt (vector signed int x, vector signed int y)
61 return vec_cmplt (x, y);
64 vector bool int
65 test6_lt (vector unsigned int x, vector unsigned int y)
67 return vec_cmplt (x, y);
70 vector bool int
71 test3_ne (vector signed int x, vector signed int y)
73 return vec_cmpne (x, y);
76 vector bool int
77 test6_ne (vector unsigned int x, vector unsigned int y)
79 return vec_cmpne (x, y);