1 /* Verify that overloaded built-ins for vec_ld with float
2    inputs produce the right code.  */
3 
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
7 
8 #include <altivec.h>
9 
10 vector float
testld_ll_vf(long long ll1,vector float vf2)11 testld_ll_vf (long long ll1, vector float vf2)
12 {
13   return vec_ld (ll1, &vf2);
14 }
15 
16 vector float
testld_ll_f(long long ll1,float f2)17 testld_ll_f (long long ll1, float f2)
18 {
19   return vec_ld (ll1, &f2);
20 }
21 
22 vector float
testld_cst_vf(vector float vf2)23 testld_cst_vf (vector float vf2)
24 {
25   return vec_ld (16, &vf2);
26 }
27 
28 vector float
testld_cst_f(float f2)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 
38