| 1 |
/* Verify that overloaded built-ins for vec_pack with long long |
| 2 |
inputs produce the right results. */ |
| 3 |
|
| 4 |
/* { dg-do compile { target lp64 } } */ |
| 5 |
/* { dg-options "-mvsx -O2" } */ |
| 6 |
/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */ |
| 7 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 8 |
|
| 9 |
#include <altivec.h> |
| 10 |
|
| 11 |
vector bool int |
| 12 |
testbl_h (vector bool long long vbl2, vector bool long long vbl3) |
| 13 |
{ |
| 14 |
return vec_pack (vbl2, vbl3); |
| 15 |
} |
| 16 |
|
| 17 |
vector signed int |
| 18 |
testsl_h (vector signed long long vsl2, vector signed long long vsl3) |
| 19 |
{ |
| 20 |
return vec_pack (vsl2, vsl3); |
| 21 |
} |
| 22 |
|
| 23 |
vector unsigned int |
| 24 |
testul_h (vector unsigned long vul2, vector unsigned long vul3) |
| 25 |
{ |
| 26 |
return vec_pack (vul2, vul3); |
| 27 |
} |
| 28 |
|
| 29 |
/* { dg-final { scan-assembler-times "vpkudum" 3 } } */ |