1declare <4 x float> @llvm.ppc.altivec.vrefp(<4 x float>) nounwind readnone
2declare <4 x float> @llvm.ppc.altivec.vrsqrtefp(<4 x float>) nounwind readnone
3
4define weak_odr float @fast_inverse_f32(float %x) readnone alwaysinline {
5  %vec = insertelement <4 x float> undef, float %x, i32 0
6  %approx = tail call <4 x float> @llvm.ppc.altivec.vrefp(<4 x float> %vec)
7  %result = extractelement <4 x float> %approx, i32 0
8  ret float %result
9}
10
11define weak_odr <4 x float> @fast_inverse_f32x4(<4 x float> %x) readnone alwaysinline {
12  %approx = tail call <4 x float> @llvm.ppc.altivec.vrefp(<4 x float> %x) #2
13  ret <4 x float> %approx
14}
15
16define weak_odr float @fast_inverse_sqrt_f32(float %x) readnone alwaysinline {
17  %vec = insertelement <4 x float> undef, float %x, i32 0
18  %approx = tail call <4 x float> @llvm.ppc.altivec.vrsqrtefp(<4 x float> %vec)
19  %result = extractelement <4 x float> %approx, i32 0
20  ret float %result
21}
22
23define weak_odr <4 x float> @fast_inverse_sqrt_f32x4(<4 x float> %x) readnone alwaysinline {
24  %approx = tail call <4 x float> @llvm.ppc.altivec.vrsqrtefp(<4 x float> %x) #2
25  ret <4 x float> %approx
26}
27