Lines Matching full:sqrt

4 declare half @llvm.amdgcn.sqrt.f16(half)
5 declare float @llvm.amdgcn.sqrt.f32(float)
6 declare double @llvm.amdgcn.sqrt.f64(double)
17 declare half @llvm.sqrt.f16(half)
18 declare float @llvm.sqrt.f32(float)
19 declare double @llvm.sqrt.f64(double)
28 %sqrt = call contract float @llvm.amdgcn.sqrt.f32(float %x)
29 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
37 ; CHECK-NEXT: [[SQRT:%.*]] = call float @llvm.amdgcn.sqrt.f32(float [[X]])
38 ; CHECK-NEXT: [[RSQ:%.*]] = call contract float @llvm.amdgcn.rcp.f32(float [[SQRT]])
41 %sqrt = call float @llvm.amdgcn.sqrt.f32(float %x)
42 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
50 ; CHECK-NEXT: [[SQRT:%.*]] = call contract float @llvm.amdgcn.sqrt.f32(float [[X]])
51 ; CHECK-NEXT: [[RSQ:%.*]] = call float @llvm.amdgcn.rcp.f32(float [[SQRT]])
54 %sqrt = call contract float @llvm.amdgcn.sqrt.f32(float %x)
55 %rsq = call float @llvm.amdgcn.rcp.f32(float %sqrt)
59 ; Reject from multiple uses of sqrt
63 ; CHECK-NEXT: [[SQRT:%.*]] = call contract float @llvm.amdgcn.sqrt.f32(float [[X]])
64 ; CHECK-NEXT: store float [[SQRT]], ptr [[PTR]], align 4
65 ; CHECK-NEXT: [[RSQ:%.*]] = call contract float @llvm.amdgcn.rcp.f32(float [[SQRT]])
68 %sqrt = call contract float @llvm.amdgcn.sqrt.f32(float %x)
69 store float %sqrt, ptr %ptr
70 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
81 %sqrt = call nnan contract float @llvm.amdgcn.sqrt.f32(float %x)
82 %rsq = call ninf contract float @llvm.amdgcn.rcp.f32(float %sqrt)
93 %sqrt = call contract half @llvm.amdgcn.sqrt.f16(half %x)
94 %rsq = call contract half @llvm.amdgcn.rcp.f16(half %sqrt)
102 ; CHECK-NEXT: [[SQRT:%.*]] = call half @llvm.sqrt.f16(half [[X]])
103 ; CHECK-NEXT: [[RSQ:%.*]] = call contract half @llvm.amdgcn.rcp.f16(half [[SQRT]])
106 %sqrt = call half @llvm.amdgcn.sqrt.f16(half %x)
107 %rsq = call contract half @llvm.amdgcn.rcp.f16(half %sqrt)
115 ; CHECK-NEXT: [[SQRT:%.*]] = call contract half @llvm.sqrt.f16(half [[X]])
116 ; CHECK-NEXT: [[RSQ:%.*]] = call half @llvm.amdgcn.rcp.f16(half [[SQRT]])
119 %sqrt = call contract half @llvm.amdgcn.sqrt.f16(half %x)
120 %rsq = call half @llvm.amdgcn.rcp.f16(half %sqrt)
124 ; Reject from multiple uses of sqrt
128 ; CHECK-NEXT: [[SQRT:%.*]] = call contract half @llvm.sqrt.f16(half [[X]])
129 ; CHECK-NEXT: store half [[SQRT]], ptr [[PTR]], align 2
130 ; CHECK-NEXT: [[RSQ:%.*]] = call contract half @llvm.amdgcn.rcp.f16(half [[SQRT]])
133 %sqrt = call contract half @llvm.amdgcn.sqrt.f16(half %x)
134 store half %sqrt, ptr %ptr
135 %rsq = call contract half @llvm.amdgcn.rcp.f16(half %sqrt)
146 %sqrt = call nnan contract half @llvm.amdgcn.sqrt.f16(half %x)
147 %rsq = call ninf contract half @llvm.amdgcn.rcp.f16(half %sqrt)
158 %sqrt = call contract double @llvm.amdgcn.sqrt.f64(double %x)
159 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)
167 ; CHECK-NEXT: [[SQRT:%.*]] = call double @llvm.amdgcn.sqrt.f64(double [[X]])
168 ; CHECK-NEXT: [[RSQ:%.*]] = call contract double @llvm.amdgcn.rcp.f64(double [[SQRT]])
171 %sqrt = call double @llvm.amdgcn.sqrt.f64(double %x)
172 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)
180 ; CHECK-NEXT: [[SQRT:%.*]] = call contract double @llvm.amdgcn.sqrt.f64(double [[X]])
181 ; CHECK-NEXT: [[RSQ:%.*]] = call double @llvm.amdgcn.rcp.f64(double [[SQRT]])
184 %sqrt = call contract double @llvm.amdgcn.sqrt.f64(double %x)
185 %rsq = call double @llvm.amdgcn.rcp.f64(double %sqrt)
189 ; Reject from multiple uses of sqrt
193 ; CHECK-NEXT: [[SQRT:%.*]] = call contract double @llvm.amdgcn.sqrt.f64(double [[X]])
194 ; CHECK-NEXT: store double [[SQRT]], ptr [[PTR]], align 8
195 ; CHECK-NEXT: [[RSQ:%.*]] = call contract double @llvm.amdgcn.rcp.f64(double [[SQRT]])
198 %sqrt = call contract double @llvm.amdgcn.sqrt.f64(double %x)
199 store double %sqrt, ptr %ptr
200 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)
211 %sqrt = call nnan contract double @llvm.amdgcn.sqrt.f64(double %x)
212 %rsq = call ninf contract double @llvm.amdgcn.rcp.f64(double %sqrt)
216 ; Do not contract with regular sqrt
220 ; CHECK-NEXT: [[SQRT:%.*]] = call contract float @llvm.sqrt.f32(float [[X]])
221 ; CHECK-NEXT: [[RSQ:%.*]] = call contract float @llvm.amdgcn.rcp.f32(float [[SQRT]])
224 %sqrt = call contract float @llvm.sqrt.f32(float %x)
225 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
229 ; Do contract with regular sqrt for f16
236 %sqrt = call contract half @llvm.sqrt.f16(half %x)
237 %rsq = call contract half @llvm.amdgcn.rcp.f16(half %sqrt)
241 ; Do not contract with regular sqrt
245 ; CHECK-NEXT: [[SQRT:%.*]] = call contract double @llvm.sqrt.f64(double [[X]])
246 ; CHECK-NEXT: [[RSQ:%.*]] = call contract double @llvm.amdgcn.rcp.f64(double [[SQRT]])
249 %sqrt = call contract double @llvm.sqrt.f64(double %x)
250 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)
260 %sqrt = call afn contract float @llvm.sqrt.f32(float %x)
261 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
271 %sqrt = call contract float @llvm.sqrt.f32(float %x), !fpmath !0
272 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
282 %sqrt = call contract float @llvm.sqrt.f32(float %x), !fpmath !1
283 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
287 ; Ignore f64 sqrt
291 ; CHECK-NEXT: [[SQRT:%.*]] = call contract afn double @llvm.sqrt.f64(double [[X]])
292 ; CHECK-NEXT: [[RSQ:%.*]] = call contract double @llvm.amdgcn.rcp.f64(double [[SQRT]])
295 %sqrt = call afn contract double @llvm.sqrt.f64(double %x)
296 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)
300 ; Ignore f64 sqrt
304 ; CHECK-NEXT: [[SQRT:%.*]] = call contract double @llvm.sqrt.f64(double [[X]]), !fpmath !0
305 ; CHECK-NEXT: [[RSQ:%.*]] = call contract double @llvm.amdgcn.rcp.f64(double [[SQRT]])
308 %sqrt = call contract double @llvm.sqrt.f64(double %x), !fpmath !0
309 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)
313 ; Ignore f64 sqrt
317 ; CHECK-NEXT: [[SQRT:%.*]] = call contract double @llvm.sqrt.f64(double [[X]]), !fpmath !1
318 ; CHECK-NEXT: [[RSQ:%.*]] = call contract double @llvm.amdgcn.rcp.f64(double [[SQRT]])
321 %sqrt = call contract double @llvm.sqrt.f64(double %x), !fpmath !1
322 %rsq = call contract double @llvm.amdgcn.rcp.f64(double %sqrt)