| 1 |
/* Verify that overloaded built-ins for vec_neg with short |
| 2 |
inputs produce the right code. */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-mvsx -O2 -mdejagnu-cpu=power8" } */ |
| 6 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 7 |
|
| 8 |
|
| 9 |
#include <altivec.h> |
| 10 |
|
| 11 |
vector signed short |
| 12 |
test3 (vector signed short x) |
| 13 |
{ |
| 14 |
return vec_neg (x); |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-assembler-times "xxspltib|vspltisw|vxor" 1 } } */ |
| 18 |
/* { dg-final { scan-assembler-times "vsubuhm" 1 } } */ |
| 19 |
/* { dg-final { scan-assembler-times "vmaxsh" 0 } } */ |