c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-select-int.c
blob510fc564370aad8c9f5d78fe552ab55e0b94f1dc
1 /* Verify that overloaded built-ins for vec_sel with int
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-maltivec -O2" } */
8 #include <altivec.h>
10 vector bool int
11 test1_0 (vector bool int x, vector bool int y, vector bool int z)
13 return vec_sel (x, y, z);
16 vector bool int
17 test1_1 (vector bool int x, vector bool int y, vector unsigned int z)
19 return vec_sel (x, y, z);
22 vector signed int
23 test3_0 (vector signed int x, vector signed int y, vector bool int z)
25 return vec_sel (x, y, z);
28 vector signed int
29 test3_1 (vector signed int x, vector signed int y, vector unsigned int z)
31 return vec_sel (x, y, z);
34 vector unsigned int
35 test6_0 (vector unsigned int x, vector unsigned int y, vector bool int z)
37 return vec_sel (x, y, z);
40 vector unsigned int
41 test6_1 (vector unsigned int x, vector unsigned int y, vector unsigned int z)
43 return vec_sel (x, y, z);
46 /* { dg-final { scan-assembler-times {\mxxsel\M|\mvsel\M} 6 } } */