[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-unpack-short.c
blobda5101271f420b18142a35bed49cb5269571bea2
1 /* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with int
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
8 #include <altivec.h>
10 vector bool int
11 testbi_el (vector bool short vbs2)
13 return vec_unpackl (vbs2);
16 vector signed int
17 testsi_el (vector signed short vss2)
19 return vec_unpackl (vss2);
22 vector bool int
23 testbi_eh (vector bool short vbs2)
25 return vec_unpackh (vbs2);
28 vector signed int
29 testsi_eh (vector signed short vss2)
31 return vec_unpackh (vss2);
34 /* { dg-final { scan-assembler-times "vupkhsh" 2 } } */
35 /* { dg-final { scan-assembler-times "vupklsh" 2 } } */