[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-cmp-int.h
blob5de4ff99a99a5e852a4d9391ec4b2b90f70312be
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_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
7 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
9 #include <altivec.h>
11 vector bool int
12 test3_eq (vector signed int x, vector signed int y)
14 return vec_cmpeq (x, y);
17 vector bool int
18 test6_eq (vector unsigned int x, vector unsigned int y)
20 return vec_cmpeq (x, y);
23 vector bool int
24 test3_ge (vector signed int x, vector signed int y)
26 return vec_cmpge (x, y);
29 vector bool int
30 test6_ge (vector unsigned int x, vector unsigned int y)
32 return vec_cmpge (x, y);
35 vector bool int
36 test3_gt (vector signed int x, vector signed int y)
38 return vec_cmpgt (x, y);
41 vector bool int
42 test6_gt (vector unsigned int x, vector unsigned int y)
44 return vec_cmpgt (x, y);
47 vector bool int
48 test3_le (vector signed int x, vector signed int y)
50 return vec_cmple (x, y);
53 vector bool int
54 test6_le (vector unsigned int x, vector unsigned int y)
56 return vec_cmple (x, y);
59 vector bool int
60 test3_lt (vector signed int x, vector signed int y)
62 return vec_cmplt (x, y);
65 vector bool int
66 test6_lt (vector unsigned int x, vector unsigned int y)
68 return vec_cmplt (x, y);
71 vector bool int
72 test3_ne (vector signed int x, vector signed int y)
74 return vec_cmpne (x, y);
77 vector bool int
78 test6_ne (vector unsigned int x, vector unsigned int y)
80 return vec_cmpne (x, y);