[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-unpack-char.c
blob7f4b3721b20f5409b6a8c973bad14b4c4ef8dfdd
1 /* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with char
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 short
11 testbc_l (vector bool char vbc2)
13 return vec_unpackl (vbc2);
16 vector signed short
17 testsc_l (vector signed char vsc2)
19 return vec_unpackl (vsc2);
22 vector bool short
23 testbc_h (vector bool char vbc2)
25 return vec_unpackh (vbc2);
28 vector signed short
29 testsc_h (vector signed char vsc2)
31 return vec_unpackh (vsc2);
34 /* { dg-final { scan-assembler-times "vupkhsb" 2 } } */
35 /* { dg-final { scan-assembler-times "vupklsb" 2 } } */