1 /* Verify that overloaded built-ins for vec_sel with long long
2 inputs produce the right code. */
3
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
7
8 #include <altivec.h>
9
10 vector bool long long
test1_0(vector bool long long x,vector bool long long y,vector bool long long z)11 test1_0 (vector bool long long x,vector bool long long y, vector bool long long z)
12 {
13 return vec_sel (x, y, z);
14 }
15
16 vector bool long long
test1_1(vector bool long long x,vector bool long long y,vector unsigned long long z)17 test1_1 (vector bool long long x, vector bool long long y, vector unsigned long long z)
18 {
19 return vec_sel (x, y, z);
20 }
21
22 vector signed long long
test3_0(vector signed long long x,vector signed long long y,vector bool long long z)23 test3_0 (vector signed long long x, vector signed long long y, vector bool long long z)
24 {
25 return vec_sel (x, y, z);
26 }
27
28 vector unsigned long long
test3_1(vector unsigned long long x,vector unsigned long long y,vector bool long long z)29 test3_1 (vector unsigned long long x, vector unsigned long long y, vector bool long long z)
30 {
31 return vec_sel (x, y, z);
32 }
33
34 /* { dg-final { scan-assembler-times "xxsel" 4 } } */
35