1 /* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with int
2    inputs produce the right code.  */
3 
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_p8vector_ok } */
6 /* { dg-options "-mpower8-vector -O2" } */
7 
8 #include <altivec.h>
9 
10 vector bool long long
testbi_l(vector bool int vbi2)11 testbi_l (vector bool int vbi2)
12 {
13   return vec_unpackl (vbi2);
14 }
15 
16 vector signed long long
testsi_l(vector signed int vsi2)17 testsi_l (vector signed int vsi2)
18 {
19   return vec_unpackl (vsi2);
20 }
21 
22 vector bool long long
testbi_h(vector bool int vbi2)23 testbi_h (vector bool int vbi2)
24 {
25   return vec_unpackh (vbi2);
26 }
27 
28 vector signed long long
testsi_h(vector signed int vsi2)29 testsi_h (vector signed int vsi2)
30 {
31   return vec_unpackh (vsi2);
32 }
33 
34 /* { dg-final { scan-assembler-times "vupkhsw" 2 } } */
35 /* { dg-final { scan-assembler-times "vupklsw" 2 } } */
36