[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-mergehl-longlong.c
blobad7e51b1253c9546e430dbe3f68424539c55263e
1 /* Verify that overloaded built-ins for vec_merge* with long long
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
7 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
9 #include <altivec.h>
11 vector bool long long
12 testbl_l (vector bool long long vbl2, vector bool long long vbl3)
14 return vec_mergel (vbl2, vbl3);
17 vector signed long long
18 testsl_l (vector signed long long vsl2, vector signed long long vsl3)
20 return vec_mergel (vsl2, vsl3);
23 vector unsigned long long
24 testul_l (vector unsigned long long vul2, vector unsigned long long vul3)
26 return vec_mergel (vul2, vul3);
29 vector bool long long
30 testbl_h (vector bool long long vbl2, vector bool long long vbl3)
32 return vec_mergeh (vbl2, vbl3);
35 vector signed long long
36 testsl_h (vector signed long long vsl2, vector signed long long vsl3)
38 return vec_mergeh (vsl2, vsl3);
41 vector unsigned long long
42 testul_h (vector unsigned long long vul2, vector unsigned long long vul3)
44 return vec_mergeh (vul2, vul3);
47 /* mergeh with longlong types use xxpermdi (1 ea). */
48 /* { dg-final { scan-assembler-times "xxpermdi" 6 } } */