c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-mergehl-longlong.c
blobec3d10e1ec6679ce31ffbfa196d2a7ce63134338
1 /* Verify that overloaded built-ins for vec_merge* with long long
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-options "-mvsx -O2" } */
6 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
7 /* { dg-require-effective-target powerpc_vsx } */
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 } } */