[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-perm-char.c
blob56a89f3f79b8535dde3705b384e60be92cb1dfff
1 /* Verify that overloaded built-ins for vec_perm 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 char
11 testbc (vector bool char vbc2, vector bool char vbc3,
12 vector unsigned char vuc)
14 return vec_perm (vbc2, vbc3, vuc);
17 vector signed char
18 testsc (vector signed char vsc2, vector signed char vsc3,
19 vector unsigned char vuc)
21 return vec_perm (vsc2, vsc3, vuc);
24 vector unsigned char
25 testuc (vector unsigned char vuc2, vector unsigned char vuc3,
26 vector unsigned char vuc)
28 return vec_perm (vuc2, vuc3, vuc);
31 /* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 3 } } */