1declare float @llvm.sqrt.f32(float);
2declare <4 x float> @llvm.sqrt.v4f32(<4 x float>);
3declare <2 x float> @llvm.sqrt.v2f32(<2 x float>);
4
5; fast_inverse
6
7define weak_odr float @fast_inverse_f32(float %x) nounwind alwaysinline {
8       %y = fdiv float 1.0, %x
9       ret float %y
10}
11
12define weak_odr <2 x float> @fast_inverse_f32x2(<2 x float> %x) nounwind alwaysinline {
13       %y = fdiv <2 x float> <float 1.0, float 1.0>, %x
14       ret <2 x float> %y
15}
16
17define weak_odr <4 x float> @fast_inverse_f32x4(<4 x float> %x) nounwind alwaysinline {
18       %y = fdiv <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0>, %x
19       ret <4 x float> %y
20}
21
22; fast_inverse_sqrt
23
24define weak_odr float @fast_inverse_sqrt_f32(float %x) nounwind alwaysinline {
25       %y = call float @llvm.sqrt.f32(float %x)
26       %z = fdiv float 1.0, %y
27       ret float %z
28}
29
30define weak_odr <2 x float> @fast_inverse_sqrt_f32x2(<2 x float> %x) nounwind alwaysinline {
31       %y = call <2 x float> @llvm.sqrt.v2f32(<2 x float> %x)
32       %z = fdiv <2 x float> <float 1.0, float 1.0>, %y
33       ret <2 x float> %z
34}
35
36define weak_odr <4 x float> @fast_inverse_sqrt_f32x4(<4 x float> %x) nounwind alwaysinline {
37       %y = call <4 x float> @llvm.sqrt.v4f32(<4 x float> %x)
38       %z = fdiv <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0>, %y
39       ret <4 x float> %z
40}
41
42