Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-cmp-short.h
blob5729db4aaee869c316af1a56085e048606f4013d
1 /* Verify that overloaded built-ins for vec_cmp with short
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 short
11 test3_eq (vector signed short x, vector signed short y)
13 return vec_cmpeq (x, y);
16 vector bool short
17 test6_eq (vector unsigned short x, vector unsigned short y)
19 return vec_cmpeq (x, y);
22 vector bool short
23 test3_ge (vector signed short x, vector signed short y)
25 return vec_cmpge (x, y);
28 vector bool short
29 test6_ge (vector unsigned short x, vector unsigned short y)
31 return vec_cmpge (x, y);
34 vector bool short
35 test3_gt (vector signed short x, vector signed short y)
37 return vec_cmpgt (x, y);
40 vector bool short
41 test6_gt (vector unsigned short x, vector unsigned short y)
43 return vec_cmpgt (x, y);
47 vector bool short
48 test3_le (vector signed short x, vector signed short y)
50 return vec_cmple (x, y);
53 vector bool short
54 test6_le (vector unsigned short x, vector unsigned short y)
56 return vec_cmple (x, y);
59 vector bool short
60 test3_lt (vector signed short x, vector signed short y)
62 return vec_cmplt (x, y);
65 vector bool short
66 test6_lt (vector unsigned short x, vector unsigned short y)
68 return vec_cmplt (x, y);
71 vector bool short
72 test3_ne (vector signed short x, vector signed short y)
74 return vec_cmpne (x, y);
77 vector bool short
78 test6_ne (vector unsigned short x, vector unsigned short y)
80 return vec_cmpne (x, y);