| 1 |
/* Verify that overloaded built-ins for vec_abs with char |
| 2 |
inputs produce the right code. */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-maltivec -O2" } */ |
| 6 |
/* { dg-require-effective-target powerpc_altivec } */ |
| 7 |
|
| 8 |
#include <altivec.h> |
| 9 |
|
| 10 |
vector signed char |
| 11 |
test2 (vector signed char x) |
| 12 |
{ |
| 13 |
return vec_abs (x); |
| 14 |
} |
| 15 |
|
| 16 |
/* { dg-final { scan-assembler-times "vspltisw|vxor|xxspltib" 1 } } */ |
| 17 |
/* { dg-final { scan-assembler-times "vsububm" 1 } } */ |
| 18 |
/* { dg-final { scan-assembler-times "vmaxsb" 1 } } */ |