| 1 |
/* Verify that overloaded built-ins for vec_splat with float |
| 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 float |
| 11 |
testf_l (vector float vf2, vector float vf3) |
| 12 |
{ |
| 13 |
return vec_mergel (vf2, vf3); |
| 14 |
} |
| 15 |
|
| 16 |
vector float |
| 17 |
testf_h (vector float vf2, vector float vf3) |
| 18 |
{ |
| 19 |
return vec_mergeh (vf2, vf3); |
| 20 |
} |
| 21 |
|
| 22 |
/* mergeh with floats use xxmrgh{l,w} (1 ea) insns. */ |
| 23 |
|
| 24 |
/* { dg-final { scan-assembler-times "xxmrghw|vmrghw" 1 } } */ |
| 25 |
/* { dg-final { scan-assembler-times "xxmrglw|vmrglw" 1 } } */ |
| 26 |
|