[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-ld-float.c
blobff6b965c04072d7096e283ba23c9dfc59a678524
1 /* Verify that overloaded built-ins for vec_ld with float
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
8 #include <altivec.h>
10 vector float
11 testld_ll_vf (long long ll1, vector float vf2)
13 return vec_ld (ll1, &vf2);
16 vector float
17 testld_ll_f (long long ll1, float f2)
19 return vec_ld (ll1, &f2);
22 vector float
23 testld_cst_vf (vector float vf2)
25 return vec_ld (16, &vf2);
28 vector float
29 testld_cst_f (float f2)
31 return vec_ld (16, &f2);
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 } } */