| 1 |
/* Verify that overloaded built-ins for vec_cntlz with long long |
| 2 |
inputs produce the right results. */ |
| 3 |
|
| 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 } */ |
| 8 |
|
| 9 |
#include <altivec.h> |
| 10 |
|
| 11 |
vector signed long long |
| 12 |
testsl (vector signed long long vsl2) |
| 13 |
{ |
| 14 |
return vec_cntlz (vsl2); |
| 15 |
} |
| 16 |
|
| 17 |
vector unsigned long long |
| 18 |
testul (vector unsigned long long vul2) |
| 19 |
{ |
| 20 |
return vec_cntlz (vul2); |
| 21 |
} |
| 22 |
|
| 23 |
/* { dg-final { scan-assembler-times "vclzd" 2 } } */ |