| 1 |
/* Verify that overloaded built-ins for vec_ld 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 |
testld_ll_vf (long long ll1, vector float vf2) |
| 12 |
{ |
| 13 |
return vec_ld (ll1, &vf2); |
| 14 |
} |
| 15 |
|
| 16 |
vector float |
| 17 |
testld_ll_f (long long ll1, float f2) |
| 18 |
{ |
| 19 |
return vec_ld (ll1, &f2); |
| 20 |
} |
| 21 |
|
| 22 |
vector float |
| 23 |
testld_cst_vf (vector float vf2) |
| 24 |
{ |
| 25 |
return vec_ld (16, &vf2); |
| 26 |
} |
| 27 |
|
| 28 |
vector float |
| 29 |
testld_cst_f (float f2) |
| 30 |
{ |
| 31 |
return vec_ld (16, &f2); |
| 32 |
} |
| 33 |
|
| 34 |
// lvx - generated by ll_vf and ll_f |
| 35 |
// lxvd2x - generated by cst_vf and cst_f |
| 36 |
/* { dg-final { scan-assembler-times {\mlvx\M|\mlxvd2x\M|\mlxv\M} 4 } } */ |
| 37 |
|