@@ -20,9 +20,9 @@ define void @three_fdiv_float(float %D, float %a, float %b, float %c) #0 {
20
20
; CHECK-NEXT: fmul s1, s2, s4
21
21
; CHECK-NEXT: fmul s2, s3, s4
22
22
; CHECK-NEXT: b foo_3f
23
- %div = fdiv float %a , %D
24
- %div1 = fdiv float %b , %D
25
- %div2 = fdiv float %c , %D
23
+ %div = fdiv arcp float %a , %D
24
+ %div1 = fdiv arcp float %b , %D
25
+ %div2 = fdiv arcp float %c , %D
26
26
tail call void @foo_3f (float %div , float %div1 , float %div2 )
27
27
ret void
28
28
}
@@ -36,9 +36,9 @@ define void @three_fdiv_double(double %D, double %a, double %b, double %c) #0 {
36
36
; CHECK-NEXT: fmul d1, d2, d4
37
37
; CHECK-NEXT: fmul d2, d3, d4
38
38
; CHECK-NEXT: b foo_3d
39
- %div = fdiv double %a , %D
40
- %div1 = fdiv double %b , %D
41
- %div2 = fdiv double %c , %D
39
+ %div = fdiv arcp double %a , %D
40
+ %div1 = fdiv arcp double %b , %D
41
+ %div2 = fdiv arcp double %c , %D
42
42
tail call void @foo_3d (double %div , double %div1 , double %div2 )
43
43
ret void
44
44
}
@@ -52,9 +52,9 @@ define void @three_fdiv_4xfloat(<4 x float> %D, <4 x float> %a, <4 x float> %b,
52
52
; CHECK-NEXT: fmul v1.4s, v2.4s, v4.4s
53
53
; CHECK-NEXT: fmul v2.4s, v3.4s, v4.4s
54
54
; CHECK-NEXT: b foo_3_4xf
55
- %div = fdiv <4 x float > %a , %D
56
- %div1 = fdiv <4 x float > %b , %D
57
- %div2 = fdiv <4 x float > %c , %D
55
+ %div = fdiv arcp <4 x float > %a , %D
56
+ %div1 = fdiv arcp <4 x float > %b , %D
57
+ %div2 = fdiv arcp <4 x float > %c , %D
58
58
tail call void @foo_3_4xf (<4 x float > %div , <4 x float > %div1 , <4 x float > %div2 )
59
59
ret void
60
60
}
@@ -68,9 +68,9 @@ define void @three_fdiv_2xdouble(<2 x double> %D, <2 x double> %a, <2 x double>
68
68
; CHECK-NEXT: fmul v1.2d, v2.2d, v4.2d
69
69
; CHECK-NEXT: fmul v2.2d, v3.2d, v4.2d
70
70
; CHECK-NEXT: b foo_3_2xd
71
- %div = fdiv <2 x double > %a , %D
72
- %div1 = fdiv <2 x double > %b , %D
73
- %div2 = fdiv <2 x double > %c , %D
71
+ %div = fdiv arcp <2 x double > %a , %D
72
+ %div1 = fdiv arcp <2 x double > %b , %D
73
+ %div2 = fdiv arcp <2 x double > %c , %D
74
74
tail call void @foo_3_2xd (<2 x double > %div , <2 x double > %div1 , <2 x double > %div2 )
75
75
ret void
76
76
}
@@ -84,8 +84,8 @@ define void @two_fdiv_float(float %D, float %a, float %b) #0 {
84
84
; CHECK-NEXT: fdiv s1, s2, s0
85
85
; CHECK-NEXT: fmov s0, s3
86
86
; CHECK-NEXT: b foo_2f
87
- %div = fdiv float %a , %D
88
- %div1 = fdiv float %b , %D
87
+ %div = fdiv arcp float %a , %D
88
+ %div1 = fdiv arcp float %b , %D
89
89
tail call void @foo_2f (float %div , float %div1 )
90
90
ret void
91
91
}
@@ -97,8 +97,8 @@ define void @two_fdiv_double(double %D, double %a, double %b) #0 {
97
97
; CHECK-NEXT: fdiv d1, d2, d0
98
98
; CHECK-NEXT: fmov d0, d3
99
99
; CHECK-NEXT: b foo_2d
100
- %div = fdiv double %a , %D
101
- %div1 = fdiv double %b , %D
100
+ %div = fdiv arcp double %a , %D
101
+ %div1 = fdiv arcp double %b , %D
102
102
tail call void @foo_2d (double %div , double %div1 )
103
103
ret void
104
104
}
@@ -125,10 +125,10 @@ define void @four_fdiv_multi_float(float %D, float %a, float %b, float %c) #0 {
125
125
; CHECK-GI-NEXT: fmul s2, s3, s5
126
126
; CHECK-GI-NEXT: fmov s3, s4
127
127
; CHECK-GI-NEXT: b foo_4f
128
- %div = fdiv float %a , %D
129
- %div1 = fdiv float %b , %D
130
- %div2 = fdiv float %c , %D
131
- %div3 = fdiv float %D , %D
128
+ %div = fdiv arcp float %a , %D
129
+ %div1 = fdiv arcp float %b , %D
130
+ %div2 = fdiv arcp float %c , %D
131
+ %div3 = fdiv arcp float %D , %D
132
132
tail call void @foo_4f (float %div , float %div1 , float %div2 , float %div3 )
133
133
ret void
134
134
}
@@ -146,9 +146,9 @@ define void @splat_three_fdiv_4xfloat(float %D, <4 x float> %a, <4 x float> %b,
146
146
; CHECK-NEXT: b foo_3_4xf
147
147
%D.ins = insertelement <4 x float > poison, float %D , i64 0
148
148
%splat = shufflevector <4 x float > %D.ins , <4 x float > poison, <4 x i32 > zeroinitializer
149
- %div = fdiv <4 x float > %a , %splat
150
- %div1 = fdiv <4 x float > %b , %splat
151
- %div2 = fdiv <4 x float > %c , %splat
149
+ %div = fdiv arcp <4 x float > %a , %splat
150
+ %div1 = fdiv arcp <4 x float > %b , %splat
151
+ %div2 = fdiv arcp <4 x float > %c , %splat
152
152
tail call void @foo_3_4xf (<4 x float > %div , <4 x float > %div1 , <4 x float > %div2 )
153
153
ret void
154
154
}
@@ -172,7 +172,7 @@ define <4 x float> @splat_fdiv_v4f32(float %D, <4 x float> %a) #1 {
172
172
entry:
173
173
%D.ins = insertelement <4 x float > poison, float %D , i64 0
174
174
%splat = shufflevector <4 x float > %D.ins , <4 x float > poison, <4 x i32 > zeroinitializer
175
- %div = fdiv <4 x float > %a , %splat
175
+ %div = fdiv arcp <4 x float > %a , %splat
176
176
ret <4 x float > %div
177
177
}
178
178
@@ -187,7 +187,7 @@ define <vscale x 4 x float> @splat_fdiv_nxv4f32(float %D, <vscale x 4 x float> %
187
187
entry:
188
188
%D.ins = insertelement <vscale x 4 x float > poison, float %D , i64 0
189
189
%splat = shufflevector <vscale x 4 x float > %D.ins , <vscale x 4 x float > poison, <vscale x 4 x i32 > zeroinitializer
190
- %div = fdiv <vscale x 4 x float > %a , %splat
190
+ %div = fdiv arcp <vscale x 4 x float > %a , %splat
191
191
ret <vscale x 4 x float > %div
192
192
}
193
193
@@ -204,9 +204,9 @@ define void @splat_three_fdiv_nxv4f32(float %D, <vscale x 4 x float> %a, <vscale
204
204
entry:
205
205
%D.ins = insertelement <vscale x 4 x float > poison, float %D , i64 0
206
206
%splat = shufflevector <vscale x 4 x float > %D.ins , <vscale x 4 x float > poison, <vscale x 4 x i32 > zeroinitializer
207
- %div = fdiv <vscale x 4 x float > %a , %splat
208
- %div1 = fdiv <vscale x 4 x float > %b , %splat
209
- %div2 = fdiv <vscale x 4 x float > %c , %splat
207
+ %div = fdiv arcp <vscale x 4 x float > %a , %splat
208
+ %div1 = fdiv arcp <vscale x 4 x float > %b , %splat
209
+ %div2 = fdiv arcp <vscale x 4 x float > %c , %splat
210
210
tail call void @foo_3_nxv4f32 (<vscale x 4 x float > %div , <vscale x 4 x float > %div1 , <vscale x 4 x float > %div2 )
211
211
ret void
212
212
}
@@ -222,7 +222,7 @@ define <vscale x 2 x double> @splat_fdiv_nxv2f64(double %D, <vscale x 2 x double
222
222
entry:
223
223
%D.ins = insertelement <vscale x 2 x double > poison, double %D , i64 0
224
224
%splat = shufflevector <vscale x 2 x double > %D.ins , <vscale x 2 x double > poison, <vscale x 2 x i32 > zeroinitializer
225
- %div = fdiv <vscale x 2 x double > %a , %splat
225
+ %div = fdiv arcp <vscale x 2 x double > %a , %splat
226
226
ret <vscale x 2 x double > %div
227
227
}
228
228
@@ -238,8 +238,8 @@ define void @splat_two_fdiv_nxv2f64(double %D, <vscale x 2 x double> %a, <vscale
238
238
entry:
239
239
%D.ins = insertelement <vscale x 2 x double > poison, double %D , i64 0
240
240
%splat = shufflevector <vscale x 2 x double > %D.ins , <vscale x 2 x double > poison, <vscale x 2 x i32 > zeroinitializer
241
- %div = fdiv <vscale x 2 x double > %a , %splat
242
- %div1 = fdiv <vscale x 2 x double > %b , %splat
241
+ %div = fdiv arcp <vscale x 2 x double > %a , %splat
242
+ %div1 = fdiv arcp <vscale x 2 x double > %b , %splat
243
243
tail call void @foo_2_nxv2f64 (<vscale x 2 x double > %div , <vscale x 2 x double > %div1 )
244
244
ret void
245
245
}
0 commit comments