1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
4 declare float @llvm.ldexp.f32.i32(float, i32)
5 declare float @llvm.ldexp.f32.i64(float, i64)
6 declare <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float>, <2 x i32>)
7 declare double @llvm.ldexp.f64.i32(double, i32)
8 declare half @llvm.ldexp.f16.i32(half, i32)
9 declare bfloat @llvm.ldexp.bf16.i32(bfloat, i32)
10 declare i32 @llvm.smin.i32(i32, i32)
12 define float @ret_ldexp_f32(float %arg0, i32 %arg1) #0 {
13 ; CHECK-LABEL: define float @ret_ldexp_f32
14 ; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1:[0-9]+]] {
15 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 [[ARG1]]) #[[ATTR10:[0-9]+]]
16 ; CHECK-NEXT: ret float [[CALL]]
18 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
22 define float @ret_ldexp_f32_0(float %arg0) #0 {
23 ; CHECK-LABEL: define float @ret_ldexp_f32_0
24 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
25 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef 0) #[[ATTR10]]
26 ; CHECK-NEXT: ret float [[CALL]]
28 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
32 define float @ret_ldexp_f32_0_nopsub(float nofpclass(psub) %arg0) #0 {
33 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub
34 ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] {
35 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
36 ; CHECK-NEXT: ret float [[CALL]]
38 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
42 define float @ret_ldexp_f32_0_nonsub(float nofpclass(nsub) %arg0) #0 {
43 ; CHECK-LABEL: define nofpclass(nsub) float @ret_ldexp_f32_0_nonsub
44 ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] {
45 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nsub) float @llvm.ldexp.f32.i32(float nofpclass(nsub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
46 ; CHECK-NEXT: ret float [[CALL]]
48 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
52 define float @ret_ldexp_f32_0_nosub(float nofpclass(sub) %arg0) #0 {
53 ; CHECK-LABEL: define nofpclass(sub) float @ret_ldexp_f32_0_nosub
54 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
55 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ldexp.f32.i32(float nofpclass(sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
56 ; CHECK-NEXT: ret float [[CALL]]
58 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
62 define float @ret_ldexp_f32_0_nosub_nosnan(float nofpclass(sub snan) %arg0) #0 {
63 ; CHECK-LABEL: define nofpclass(snan sub) float @ret_ldexp_f32_0_nosub_nosnan
64 ; CHECK-SAME: (float nofpclass(snan sub) [[ARG0:%.*]]) #[[ATTR1]] {
65 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.ldexp.f32.i32(float nofpclass(snan sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
66 ; CHECK-NEXT: ret float [[CALL]]
68 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
72 define float @ret_ldexp_f32_0_nopsub_nopzero(float nofpclass(psub pzero) %arg0) #0 {
73 ; CHECK-LABEL: define nofpclass(pzero psub) float @ret_ldexp_f32_0_nopsub_nopzero
74 ; CHECK-SAME: (float nofpclass(pzero psub) [[ARG0:%.*]]) #[[ATTR1]] {
75 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero psub) float @llvm.ldexp.f32.i32(float nofpclass(pzero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
76 ; CHECK-NEXT: ret float [[CALL]]
78 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
82 define float @ret_ldexp_f32_0_nonsub_nonzero(float nofpclass(nsub nzero) %arg0) #0 {
83 ; CHECK-LABEL: define nofpclass(nzero nsub) float @ret_ldexp_f32_0_nonsub_nonzero
84 ; CHECK-SAME: (float nofpclass(nzero nsub) [[ARG0:%.*]]) #[[ATTR1]] {
85 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero nsub) float @llvm.ldexp.f32.i32(float nofpclass(nzero nsub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
86 ; CHECK-NEXT: ret float [[CALL]]
88 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
92 define float @ret_ldexp_f32_0_nosub_nozero(float nofpclass(sub zero) %arg0) #0 {
93 ; CHECK-LABEL: define nofpclass(zero sub) float @ret_ldexp_f32_0_nosub_nozero
94 ; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]]) #[[ATTR1]] {
95 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(zero sub) float @llvm.ldexp.f32.i32(float nofpclass(zero sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
96 ; CHECK-NEXT: ret float [[CALL]]
98 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
102 define float @ret_ldexp_f32_0_nopsub_daz(float nofpclass(psub) %arg0) #1 {
103 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub_daz
104 ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR2:[0-9]+]] {
105 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
106 ; CHECK-NEXT: ret float [[CALL]]
108 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
112 define float @ret_ldexp_f32_0_nonsub_daz(float nofpclass(nsub) %arg0) #1 {
113 ; CHECK-LABEL: define nofpclass(nsub) float @ret_ldexp_f32_0_nonsub_daz
114 ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR2]] {
115 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nsub) float @llvm.ldexp.f32.i32(float nofpclass(nsub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
116 ; CHECK-NEXT: ret float [[CALL]]
118 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
122 define float @ret_ldexp_f32_0_nosub_daz(float nofpclass(sub) %arg0) #1 {
123 ; CHECK-LABEL: define nofpclass(sub) float @ret_ldexp_f32_0_nosub_daz
124 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR2]] {
125 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ldexp.f32.i32(float nofpclass(sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
126 ; CHECK-NEXT: ret float [[CALL]]
128 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
132 define float @ret_ldexp_f32_0_nosub_nosnan_daz(float nofpclass(sub snan) %arg0) #1 {
133 ; CHECK-LABEL: define nofpclass(snan sub) float @ret_ldexp_f32_0_nosub_nosnan_daz
134 ; CHECK-SAME: (float nofpclass(snan sub) [[ARG0:%.*]]) #[[ATTR2]] {
135 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.ldexp.f32.i32(float nofpclass(snan sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
136 ; CHECK-NEXT: ret float [[CALL]]
138 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
142 define float @ret_ldexp_f32_0_nopsub_nozero_daz(float nofpclass(psub pzero) %arg0) #1 {
143 ; CHECK-LABEL: define nofpclass(pzero psub) float @ret_ldexp_f32_0_nopsub_nozero_daz
144 ; CHECK-SAME: (float nofpclass(pzero psub) [[ARG0:%.*]]) #[[ATTR2]] {
145 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero psub) float @llvm.ldexp.f32.i32(float nofpclass(pzero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
146 ; CHECK-NEXT: ret float [[CALL]]
148 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
152 define float @ret_ldexp_f32_0_nonsub_nonzero_daz(float nofpclass(nsub nzero) %arg0) #1 {
153 ; CHECK-LABEL: define nofpclass(nzero nsub) float @ret_ldexp_f32_0_nonsub_nonzero_daz
154 ; CHECK-SAME: (float nofpclass(nzero nsub) [[ARG0:%.*]]) #[[ATTR2]] {
155 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero nsub) float @llvm.ldexp.f32.i32(float nofpclass(nzero nsub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
156 ; CHECK-NEXT: ret float [[CALL]]
158 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
162 define float @ret_ldexp_f32_0_nosub_nozero_daz(float nofpclass(sub zero) %arg0) #1 {
163 ; CHECK-LABEL: define nofpclass(zero sub) float @ret_ldexp_f32_0_nosub_nozero_daz
164 ; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]]) #[[ATTR2]] {
165 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(zero sub) float @llvm.ldexp.f32.i32(float nofpclass(zero sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
166 ; CHECK-NEXT: ret float [[CALL]]
168 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
172 define float @ret_ldexp_f32_0_nopsub_dapz(float nofpclass(psub) %arg0) #2 {
173 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub_dapz
174 ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR3:[0-9]+]] {
175 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
176 ; CHECK-NEXT: ret float [[CALL]]
178 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
182 define float @ret_ldexp_f32_0_nonsub_dapz(float nofpclass(nsub) %arg0) #2 {
183 ; CHECK-LABEL: define nofpclass(nsub) float @ret_ldexp_f32_0_nonsub_dapz
184 ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR3]] {
185 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nsub) float @llvm.ldexp.f32.i32(float nofpclass(nsub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
186 ; CHECK-NEXT: ret float [[CALL]]
188 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
192 define float @ret_ldexp_f32_0_nosub_dapz(float nofpclass(sub) %arg0) #2 {
193 ; CHECK-LABEL: define nofpclass(sub) float @ret_ldexp_f32_0_nosub_dapz
194 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR3]] {
195 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ldexp.f32.i32(float nofpclass(sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
196 ; CHECK-NEXT: ret float [[CALL]]
198 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
202 define float @ret_ldexp_f32_0_nopsub_nozero_dapz(float nofpclass(psub zero) %arg0) #2 {
203 ; CHECK-LABEL: define nofpclass(nzero psub) float @ret_ldexp_f32_0_nopsub_nozero_dapz
204 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR3]] {
205 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
206 ; CHECK-NEXT: ret float [[CALL]]
208 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
212 define float @ret_ldexp_f32_0_nonsub_nonzero_dapz(float nofpclass(nsub nzero) %arg0) #2 {
213 ; CHECK-LABEL: define nofpclass(nzero nsub) float @ret_ldexp_f32_0_nonsub_nonzero_dapz
214 ; CHECK-SAME: (float nofpclass(nzero nsub) [[ARG0:%.*]]) #[[ATTR3]] {
215 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero nsub) float @llvm.ldexp.f32.i32(float nofpclass(nzero nsub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
216 ; CHECK-NEXT: ret float [[CALL]]
218 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
222 define float @ret_ldexp_f32_0_nosub_nozero_dapz(float nofpclass(sub zero) %arg0) #2 {
223 ; CHECK-LABEL: define nofpclass(zero sub) float @ret_ldexp_f32_0_nosub_nozero_dapz
224 ; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]]) #[[ATTR3]] {
225 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(zero sub) float @llvm.ldexp.f32.i32(float nofpclass(zero sub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
226 ; CHECK-NEXT: ret float [[CALL]]
228 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
232 define float @ret_ldexp_f32_0_nopsub_nozero_dapz_dapz(float nofpclass(psub zero) %arg0) #2 {
233 ; CHECK-LABEL: define nofpclass(nzero psub) float @ret_ldexp_f32_0_nopsub_nozero_dapz_dapz
234 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR3]] {
235 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
236 ; CHECK-NEXT: ret float [[CALL]]
238 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
242 define float @ret_ldexp_f32_0_nopsub_nozero_daz_ieee(float nofpclass(psub zero) %arg0) #3 {
243 ; CHECK-LABEL: define nofpclass(pzero psub) float @ret_ldexp_f32_0_nopsub_nozero_daz_ieee
244 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR4:[0-9]+]] {
245 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
246 ; CHECK-NEXT: ret float [[CALL]]
248 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
252 define float @ret_ldexp_f32_0_nopsub_nozero_daz_dynamic(float nofpclass(psub zero) %arg0) #4 {
253 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub_nozero_daz_dynamic
254 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR5:[0-9]+]] {
255 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
256 ; CHECK-NEXT: ret float [[CALL]]
258 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
262 define float @ret_ldexp_f32_0_nopsub_nozero_ieee_daz(float nofpclass(psub zero) %arg0) #5 {
263 ; CHECK-LABEL: define nofpclass(pzero psub) float @ret_ldexp_f32_0_nopsub_nozero_ieee_daz
264 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR6:[0-9]+]] {
265 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
266 ; CHECK-NEXT: ret float [[CALL]]
268 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
272 define float @ret_ldexp_f32_0_nopsub_nozero_dynamic_daz(float nofpclass(psub zero) %arg0) #6 {
273 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub_nozero_dynamic_daz
274 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR7:[0-9]+]] {
275 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
276 ; CHECK-NEXT: ret float [[CALL]]
278 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
282 define float @ret_ldexp_f32_0_nopsub_nozero_dynamic_dapz(float nofpclass(psub zero) %arg0) #7 {
283 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub_nozero_dynamic_dapz
284 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR8:[0-9]+]] {
285 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
286 ; CHECK-NEXT: ret float [[CALL]]
288 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
292 define float @ret_ldexp_f32_0_nopsub_nozero_dapz_dynamic(float nofpclass(psub zero) %arg0) #8 {
293 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_0_nopsub_nozero_dapz_dynamic
294 ; CHECK-SAME: (float nofpclass(zero psub) [[ARG0:%.*]]) #[[ATTR9:[0-9]+]] {
295 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(zero psub) [[ARG0]], i32 noundef 0) #[[ATTR10]]
296 ; CHECK-NEXT: ret float [[CALL]]
298 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
302 define float @ret_ldexp_f32_0_nopnorm(float nofpclass(pnorm) %arg0) #0 {
303 ; CHECK-LABEL: define nofpclass(pnorm) float @ret_ldexp_f32_0_nopnorm
304 ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
305 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pnorm) float @llvm.ldexp.f32.i32(float nofpclass(pnorm) [[ARG0]], i32 noundef 0) #[[ATTR10]]
306 ; CHECK-NEXT: ret float [[CALL]]
308 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
312 define float @ret_ldexp_f32_0_nnorm(float nofpclass(nnorm) %arg0) #0 {
313 ; CHECK-LABEL: define nofpclass(nnorm) float @ret_ldexp_f32_0_nnorm
314 ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
315 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nnorm) float @llvm.ldexp.f32.i32(float nofpclass(nnorm) [[ARG0]], i32 noundef 0) #[[ATTR10]]
316 ; CHECK-NEXT: ret float [[CALL]]
318 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
322 define float @ret_ldexp_f32_0_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) #0 {
323 ; CHECK-LABEL: define nofpclass(nsub pnorm) float @ret_ldexp_f32_0_nopnorm_nonsub
324 ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
325 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nsub pnorm) float @llvm.ldexp.f32.i32(float nofpclass(nsub pnorm) [[ARG0]], i32 noundef 0) #[[ATTR10]]
326 ; CHECK-NEXT: ret float [[CALL]]
328 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 0)
332 define <2 x float> @ret_ldexp_v2f32_0(<2 x float> %arg0) #0 {
333 ; CHECK-LABEL: define <2 x float> @ret_ldexp_v2f32_0
334 ; CHECK-SAME: (<2 x float> [[ARG0:%.*]]) #[[ATTR1]] {
335 ; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> <i32 undef, i32 0>) #[[ATTR10]]
336 ; CHECK-NEXT: ret <2 x float> [[CALL]]
338 %call = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> %arg0, <2 x i32> <i32 undef, i32 0>)
339 ret <2 x float> %call
342 define float @ret_ldexp_f32_i64(float %arg0, i64 %arg1) #0 {
343 ; CHECK-LABEL: define float @ret_ldexp_f32_i64
344 ; CHECK-SAME: (float [[ARG0:%.*]], i64 [[ARG1:%.*]]) #[[ATTR1]] {
345 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i64(float [[ARG0]], i64 [[ARG1]]) #[[ATTR10]]
346 ; CHECK-NEXT: ret float [[CALL]]
348 %call = call float @llvm.ldexp.f32.i64(float %arg0, i64 %arg1)
352 define <2 x float> @ret_ldexp_v2f32(<2 x float> %arg0, <2 x i32> %arg1) #0 {
353 ; CHECK-LABEL: define <2 x float> @ret_ldexp_v2f32
354 ; CHECK-SAME: (<2 x float> [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {
355 ; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> [[ARG1]]) #[[ATTR10]]
356 ; CHECK-NEXT: ret <2 x float> [[CALL]]
358 %call = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %arg1)
359 ret <2 x float> %call
362 define float @ret_ldexp_f32_nonan(float nofpclass(nan) %arg0, i32 %arg1) #0 {
363 ; CHECK-LABEL: define nofpclass(nan) float @ret_ldexp_f32_nonan
364 ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
365 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.ldexp.f32.i32(float nofpclass(nan) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
366 ; CHECK-NEXT: ret float [[CALL]]
368 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
372 define float @ret_ldexp_f32_nosnan(float nofpclass(snan) %arg0, i32 %arg1) #0 {
373 ; CHECK-LABEL: define nofpclass(snan) float @ret_ldexp_f32_nosnan
374 ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
375 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.ldexp.f32.i32(float nofpclass(snan) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
376 ; CHECK-NEXT: ret float [[CALL]]
378 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
382 define float @ret_ldexp_f32_noqnan(float nofpclass(qnan) %arg0, i32 %arg1) #0 {
383 ; CHECK-LABEL: define float @ret_ldexp_f32_noqnan
384 ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
385 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(qnan) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
386 ; CHECK-NEXT: ret float [[CALL]]
388 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
392 define float @ret_ldexp_f32_noneg(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #0 {
393 ; CHECK-LABEL: define nofpclass(ninf nsub nnorm) float @ret_ldexp_f32_noneg
394 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
395 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
396 ; CHECK-NEXT: ret float [[CALL]]
398 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
402 define float @ret_ldexp_f32_noneg_nonzero(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #0 {
403 ; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_ldexp_f32_noneg_nonzero
404 ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
405 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
406 ; CHECK-NEXT: ret float [[CALL]]
408 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
412 define float @ret_ldexp_f32_noneg_nozero(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #0 {
413 ; CHECK-LABEL: define nofpclass(ninf nsub nnorm) float @ret_ldexp_f32_noneg_nozero
414 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
415 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
416 ; CHECK-NEXT: ret float [[CALL]]
418 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
422 define float @ret_ldexp_f32_nonzero(float nofpclass(nzero) %arg0, i32 %arg1) #0 {
423 ; CHECK-LABEL: define float @ret_ldexp_f32_nonzero
424 ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
425 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(nzero) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
426 ; CHECK-NEXT: ret float [[CALL]]
428 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
432 define float @ret_ldexp_f32_nopzero(float nofpclass(pzero) %arg0, i32 %arg1) #0 {
433 ; CHECK-LABEL: define float @ret_ldexp_f32_nopzero
434 ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
435 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(pzero) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
436 ; CHECK-NEXT: ret float [[CALL]]
438 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
442 define float @ret_ldexp_f32_noneg_ftz_daz(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #1 {
443 ; CHECK-LABEL: define nofpclass(ninf nsub nnorm) float @ret_ldexp_f32_noneg_ftz_daz
444 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
445 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
446 ; CHECK-NEXT: ret float [[CALL]]
448 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
452 define float @ret_ldexp_f32_noneg_nonzero_ftz_daz(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #1 {
453 ; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_ldexp_f32_noneg_nonzero_ftz_daz
454 ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
455 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
456 ; CHECK-NEXT: ret float [[CALL]]
458 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
462 define float @ret_ldexp_f32_noneg_nonzero_ftpz_dapz(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #2 {
463 ; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_ldexp_f32_noneg_nonzero_ftpz_dapz
464 ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR3]] {
465 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
466 ; CHECK-NEXT: ret float [[CALL]]
468 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
472 define float @ret_ldexp_f32_noninf_nonnorm(float nofpclass(ninf nnorm) %arg0, i32 %arg1) #0 {
473 ; CHECK-LABEL: define float @ret_ldexp_f32_noninf_nonnorm
474 ; CHECK-SAME: (float nofpclass(ninf nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
475 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(ninf nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
476 ; CHECK-NEXT: ret float [[CALL]]
478 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
482 define float @ret_ldexp_f32_noninf_nonnorm_ftz_daz(float nofpclass(ninf nnorm) %arg0, i32 %arg1) #1 {
483 ; CHECK-LABEL: define float @ret_ldexp_f32_noninf_nonnorm_ftz_daz
484 ; CHECK-SAME: (float nofpclass(ninf nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
485 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(ninf nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
486 ; CHECK-NEXT: ret float [[CALL]]
488 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
492 define float @ret_ldexp_f32_noneg_ftz_ieee(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #3 {
493 ; CHECK-LABEL: define nofpclass(ninf nsub nnorm) float @ret_ldexp_f32_noneg_ftz_ieee
494 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR4]] {
495 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
496 ; CHECK-NEXT: ret float [[CALL]]
498 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
502 define float @ret_ldexp_f32_noneg_nonzero_ftz_ieee(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #3 {
503 ; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_ldexp_f32_noneg_nonzero_ftz_ieee
504 ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR4]] {
505 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.ldexp.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
506 ; CHECK-NEXT: ret float [[CALL]]
508 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
512 define float @ret_ldexp_f32_nopos(float nofpclass(pinf psub pnorm) %arg0, i32 %arg1) #0 {
513 ; CHECK-LABEL: define nofpclass(pinf psub pnorm) float @ret_ldexp_f32_nopos
514 ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
515 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf psub pnorm) float @llvm.ldexp.f32.i32(float nofpclass(pinf psub pnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
516 ; CHECK-NEXT: ret float [[CALL]]
518 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
522 define float @ret_ldexp_f32_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0, i32 %arg1) #0 {
523 ; CHECK-LABEL: define nofpclass(pinf pzero psub pnorm) float @ret_ldexp_f32_nopos_nopzero
524 ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
525 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero psub pnorm) float @llvm.ldexp.f32.i32(float nofpclass(pinf pzero psub pnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
526 ; CHECK-NEXT: ret float [[CALL]]
528 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
532 define float @ret_ldexp_f32_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0, i32 %arg1) #0 {
533 ; CHECK-LABEL: define nofpclass(pinf pzero psub pnorm) float @ret_ldexp_f32_nopos_nozero
534 ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
535 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero psub pnorm) float @llvm.ldexp.f32.i32(float nofpclass(pinf zero psub pnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
536 ; CHECK-NEXT: ret float [[CALL]]
538 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
542 define float @ret_ldexp_f32_nozero(float nofpclass(zero) %arg0, i32 %arg1) #0 {
543 ; CHECK-LABEL: define float @ret_ldexp_f32_nozero
544 ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
545 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(zero) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
546 ; CHECK-NEXT: ret float [[CALL]]
548 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
552 define float @ret_ldexp_f32_noinf(float nofpclass(inf) %arg0, i32 %arg1) #0 {
553 ; CHECK-LABEL: define float @ret_ldexp_f32_noinf
554 ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
555 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(inf) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
556 ; CHECK-NEXT: ret float [[CALL]]
558 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
562 define float @ret_ldexp_f32_noinf_nonan(float nofpclass(inf nan) %arg0, i32 %arg1) #0 {
563 ; CHECK-LABEL: define nofpclass(nan) float @ret_ldexp_f32_noinf_nonan
564 ; CHECK-SAME: (float nofpclass(nan inf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
565 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.ldexp.f32.i32(float nofpclass(nan inf) [[ARG0]], i32 [[ARG1]]) #[[ATTR10]]
566 ; CHECK-NEXT: ret float [[CALL]]
568 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %arg1)
572 define float @ret_ldexp_f32_known_pos_exp(float %arg0, i32 %arg1) #0 {
573 ; CHECK-LABEL: define float @ret_ldexp_f32_known_pos_exp
574 ; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
575 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
576 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
577 ; CHECK-NEXT: ret float [[CALL]]
579 %and.arg1 = and i32 %arg1, 127
580 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
584 define float @ret_ldexp_f32_known_neg_exp(float %arg0, i32 %arg1) #0 {
585 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp
586 ; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
587 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
588 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
589 ; CHECK-NEXT: ret float [[CALL]]
591 %or.arg1 = or i32 %arg1, -16
592 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
596 define float @ret_ldexp_f32_known_pos_exp_nosub(float nofpclass(sub) %arg0, i32 %arg1) #0 {
597 ; CHECK-LABEL: define nofpclass(sub) float @ret_ldexp_f32_known_pos_exp_nosub
598 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
599 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
600 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ldexp.f32.i32(float nofpclass(sub) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
601 ; CHECK-NEXT: ret float [[CALL]]
603 %and.arg1 = and i32 %arg1, 127
604 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
608 define float @ret_ldexp_f32_known_neg_exp_nosub(float nofpclass(sub) %arg0, i32 %arg1) #0 {
609 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp_nosub
610 ; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
611 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
612 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(sub) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
613 ; CHECK-NEXT: ret float [[CALL]]
615 %or.arg1 = or i32 %arg1, -16
616 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
620 define float @ret_ldexp_f32_known_pos_exp_nopsub(float nofpclass(psub) %arg0, i32 %arg1) #0 {
621 ; CHECK-LABEL: define nofpclass(psub) float @ret_ldexp_f32_known_pos_exp_nopsub
622 ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
623 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
624 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(psub) float @llvm.ldexp.f32.i32(float nofpclass(psub) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
625 ; CHECK-NEXT: ret float [[CALL]]
627 %and.arg1 = and i32 %arg1, 127
628 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
632 define float @ret_ldexp_f32_known_neg_exp_nopsub(float nofpclass(psub) %arg0, i32 %arg1) #0 {
633 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp_nopsub
634 ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
635 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
636 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(psub) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
637 ; CHECK-NEXT: ret float [[CALL]]
639 %or.arg1 = or i32 %arg1, -16
640 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
644 define float @ret_ldexp_f32_known_pos_exp_nonsub(float nofpclass(nsub) %arg0, i32 %arg1) #0 {
645 ; CHECK-LABEL: define nofpclass(nsub) float @ret_ldexp_f32_known_pos_exp_nonsub
646 ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
647 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
648 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nsub) float @llvm.ldexp.f32.i32(float nofpclass(nsub) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
649 ; CHECK-NEXT: ret float [[CALL]]
651 %and.arg1 = and i32 %arg1, 127
652 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
656 define float @ret_ldexp_f32_known_neg_exp_nonsub(float nofpclass(nsub) %arg0, i32 %arg1) #0 {
657 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp_nonsub
658 ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
659 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
660 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(nsub) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
661 ; CHECK-NEXT: ret float [[CALL]]
663 %or.arg1 = or i32 %arg1, -16
664 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
668 define float @ret_ldexp_f32_known_pos_exp_noinf(float nofpclass(inf) %arg0, i32 %arg1) #0 {
669 ; CHECK-LABEL: define float @ret_ldexp_f32_known_pos_exp_noinf
670 ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
671 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
672 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(inf) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
673 ; CHECK-NEXT: ret float [[CALL]]
675 %and.arg1 = and i32 %arg1, 127
676 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
680 define float @ret_ldexp_f32_known_neg_exp_noinf(float nofpclass(inf) %arg0, i32 %arg1) #0 {
681 ; CHECK-LABEL: define nofpclass(inf) float @ret_ldexp_f32_known_neg_exp_noinf
682 ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
683 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
684 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.ldexp.f32.i32(float nofpclass(inf) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
685 ; CHECK-NEXT: ret float [[CALL]]
687 %or.arg1 = or i32 %arg1, -16
688 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
692 define <2 x float> @ret_ldexp_v2f32_known_pos_exp_noinf(<2 x float> nofpclass(inf) %arg0, <2 x i32> %arg1) #0 {
693 ; CHECK-LABEL: define <2 x float> @ret_ldexp_v2f32_known_pos_exp_noinf
694 ; CHECK-SAME: (<2 x float> nofpclass(inf) [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {
695 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and <2 x i32> [[ARG1]], <i32 127, i32 64>
696 ; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> nofpclass(inf) [[ARG0]], <2 x i32> [[AND_ARG1]]) #[[ATTR10]]
697 ; CHECK-NEXT: ret <2 x float> [[CALL]]
699 %and.arg1 = and <2 x i32> %arg1, <i32 127, i32 64>
700 %call = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %and.arg1)
701 ret <2 x float> %call
704 define <2 x float> @ret_ldexp_v2f32_known_neg_exp_noinf(<2 x float> nofpclass(inf) %arg0, <2 x i32> %arg1) #0 {
705 ; CHECK-LABEL: define <2 x float> @ret_ldexp_v2f32_known_neg_exp_noinf
706 ; CHECK-SAME: (<2 x float> nofpclass(inf) [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {
707 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or <2 x i32> [[ARG1]], <i32 -16, i32 -32>
708 ; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> nofpclass(inf) [[ARG0]], <2 x i32> [[OR_ARG1]]) #[[ATTR10]]
709 ; CHECK-NEXT: ret <2 x float> [[CALL]]
711 %or.arg1 = or <2 x i32> %arg1, <i32 -16, i32 -32>
712 %call = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %or.arg1)
713 ret <2 x float> %call
716 define float @ret_ldexp_f32_known_pos_exp_nopinf(float nofpclass(pinf) %arg0, i32 %arg1) #0 {
717 ; CHECK-LABEL: define float @ret_ldexp_f32_known_pos_exp_nopinf
718 ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
719 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
720 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(pinf) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
721 ; CHECK-NEXT: ret float [[CALL]]
723 %and.arg1 = and i32 %arg1, 127
724 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
728 define float @ret_ldexp_f32_known_neg_exp_nopinf(float nofpclass(pinf) %arg0, i32 %arg1) #0 {
729 ; CHECK-LABEL: define nofpclass(pinf) float @ret_ldexp_f32_known_neg_exp_nopinf
730 ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
731 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
732 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf) float @llvm.ldexp.f32.i32(float nofpclass(pinf) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
733 ; CHECK-NEXT: ret float [[CALL]]
735 %or.arg1 = or i32 %arg1, -16
736 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
740 define float @ret_ldexp_f32_known_pos_exp_noninf(float nofpclass(ninf) %arg0, i32 %arg1) #0 {
741 ; CHECK-LABEL: define float @ret_ldexp_f32_known_pos_exp_noninf
742 ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
743 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
744 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(ninf) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
745 ; CHECK-NEXT: ret float [[CALL]]
747 %and.arg1 = and i32 %arg1, 127
748 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
752 define float @ret_ldexp_f32_known_neg_exp_noninf(float nofpclass(ninf) %arg0, i32 %arg1) #0 {
753 ; CHECK-LABEL: define nofpclass(ninf) float @ret_ldexp_f32_known_neg_exp_noninf
754 ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
755 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
756 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf) float @llvm.ldexp.f32.i32(float nofpclass(ninf) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
757 ; CHECK-NEXT: ret float [[CALL]]
759 %or.arg1 = or i32 %arg1, -16
760 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
764 define float @ret_ldexp_f32_known_pos_exp_nopsub_nopzero_daz(float nofpclass(psub pzero) %arg0, i32 %arg1) #1 {
765 ; CHECK-LABEL: define nofpclass(pzero psub) float @ret_ldexp_f32_known_pos_exp_nopsub_nopzero_daz
766 ; CHECK-SAME: (float nofpclass(pzero psub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
767 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
768 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero psub) float @llvm.ldexp.f32.i32(float nofpclass(pzero psub) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
769 ; CHECK-NEXT: ret float [[CALL]]
771 %and.arg1 = and i32 %arg1, 127
772 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
776 define float @ret_ldexp_f32_known_neg_exp_nopsub_nopzero_daz(float nofpclass(psub pzero) %arg0, i32 %arg1) #1 {
777 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp_nopsub_nopzero_daz
778 ; CHECK-SAME: (float nofpclass(pzero psub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
779 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
780 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(pzero psub) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
781 ; CHECK-NEXT: ret float [[CALL]]
783 %or.arg1 = or i32 %arg1, -16
784 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
788 define float @ret_ldexp_f32_known_pos_exp_nonsub_nonzero_daz(float nofpclass(nsub nzero) %arg0, i32 %arg1) #1 {
789 ; CHECK-LABEL: define nofpclass(nzero nsub) float @ret_ldexp_f32_known_pos_exp_nonsub_nonzero_daz
790 ; CHECK-SAME: (float nofpclass(nzero nsub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
791 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
792 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero nsub) float @llvm.ldexp.f32.i32(float nofpclass(nzero nsub) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
793 ; CHECK-NEXT: ret float [[CALL]]
795 %and.arg1 = and i32 %arg1, 127
796 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
800 define float @ret_ldexp_f32_known_neg_exp_nonsub_nonzero_daz(float nofpclass(nsub nzero) %arg0, i32 %arg1) #1 {
801 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp_nonsub_nonzero_daz
802 ; CHECK-SAME: (float nofpclass(nzero nsub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
803 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
804 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(nzero nsub) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
805 ; CHECK-NEXT: ret float [[CALL]]
807 %or.arg1 = or i32 %arg1, -16
808 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
812 define float @ret_ldexp_f32_known_pos_exp_nosub_nozero_daz(float nofpclass(sub zero) %arg0, i32 %arg1) #1 {
813 ; CHECK-LABEL: define nofpclass(zero sub) float @ret_ldexp_f32_known_pos_exp_nosub_nozero_daz
814 ; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
815 ; CHECK-NEXT: [[AND_ARG1:%.*]] = and i32 [[ARG1]], 127
816 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(zero sub) float @llvm.ldexp.f32.i32(float nofpclass(zero sub) [[ARG0]], i32 [[AND_ARG1]]) #[[ATTR10]]
817 ; CHECK-NEXT: ret float [[CALL]]
819 %and.arg1 = and i32 %arg1, 127
820 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %and.arg1)
824 define float @ret_ldexp_f32_known_neg_exp_nosub_nozero_daz(float nofpclass(sub zero) %arg0, i32 %arg1) #1 {
825 ; CHECK-LABEL: define float @ret_ldexp_f32_known_neg_exp_nosub_nozero_daz
826 ; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
827 ; CHECK-NEXT: [[OR_ARG1:%.*]] = or i32 [[ARG1]], -16
828 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float nofpclass(zero sub) [[ARG0]], i32 [[OR_ARG1]]) #[[ATTR10]]
829 ; CHECK-NEXT: ret float [[CALL]]
831 %or.arg1 = or i32 %arg1, -16
832 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %or.arg1)
836 define float @ret_ldexp_f32_22(float %arg0) #0 {
837 ; CHECK-LABEL: define float @ret_ldexp_f32_22
838 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
839 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef 22) #[[ATTR10]]
840 ; CHECK-NEXT: ret float [[CALL]]
842 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 22)
846 define float @ret_ldexp_f32_23(float %arg0) #0 {
847 ; CHECK-LABEL: define nofpclass(sub) float @ret_ldexp_f32_23
848 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
849 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef 23) #[[ATTR10]]
850 ; CHECK-NEXT: ret float [[CALL]]
852 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 23)
856 define float @ret_ldexp_f32_24(float %arg0) #0 {
857 ; CHECK-LABEL: define nofpclass(sub) float @ret_ldexp_f32_24
858 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
859 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef 24) #[[ATTR10]]
860 ; CHECK-NEXT: ret float [[CALL]]
862 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 24)
866 define float @ret_ldexp_f32_min24(float %arg0, i32 %arg1) #0 {
867 ; CHECK-LABEL: define float @ret_ldexp_f32_min24
868 ; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
869 ; CHECK-NEXT: [[MIN:%.*]] = call i32 @llvm.smin.i32(i32 [[ARG1]], i32 noundef 24) #[[ATTR10]]
870 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 [[MIN]]) #[[ATTR10]]
871 ; CHECK-NEXT: ret float [[CALL]]
873 %min = call i32 @llvm.smin.i32(i32 %arg1, i32 24)
874 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 %min)
878 define float @ret_ldexp_f32_23_nnan(float nofpclass(nan) %arg0) #0 {
879 ; CHECK-LABEL: define nofpclass(nan sub) float @ret_ldexp_f32_23_nnan
880 ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
881 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.ldexp.f32.i32(float nofpclass(nan) [[ARG0]], i32 noundef 23) #[[ATTR10]]
882 ; CHECK-NEXT: ret float [[CALL]]
884 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 23)
888 define double @ret_ldexp_f64_24(double %arg0) #0 {
889 ; CHECK-LABEL: define double @ret_ldexp_f64_24
890 ; CHECK-SAME: (double [[ARG0:%.*]]) #[[ATTR1]] {
891 ; CHECK-NEXT: [[CALL:%.*]] = call double @llvm.ldexp.f64.i32(double [[ARG0]], i32 noundef 24) #[[ATTR10]]
892 ; CHECK-NEXT: ret double [[CALL]]
894 %call = call double @llvm.ldexp.f64.i32(double %arg0, i32 24)
898 define double @ret_ldexp_f64_51(double %arg0) #0 {
899 ; CHECK-LABEL: define double @ret_ldexp_f64_51
900 ; CHECK-SAME: (double [[ARG0:%.*]]) #[[ATTR1]] {
901 ; CHECK-NEXT: [[CALL:%.*]] = call double @llvm.ldexp.f64.i32(double [[ARG0]], i32 noundef 51) #[[ATTR10]]
902 ; CHECK-NEXT: ret double [[CALL]]
904 %call = call double @llvm.ldexp.f64.i32(double %arg0, i32 51)
908 define double @ret_ldexp_f64_52(double %arg0) #0 {
909 ; CHECK-LABEL: define nofpclass(sub) double @ret_ldexp_f64_52
910 ; CHECK-SAME: (double [[ARG0:%.*]]) #[[ATTR1]] {
911 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) double @llvm.ldexp.f64.i32(double [[ARG0]], i32 noundef 52) #[[ATTR10]]
912 ; CHECK-NEXT: ret double [[CALL]]
914 %call = call double @llvm.ldexp.f64.i32(double %arg0, i32 52)
918 define double @ret_ldexp_f64_53(double %arg0) #0 {
919 ; CHECK-LABEL: define nofpclass(sub) double @ret_ldexp_f64_53
920 ; CHECK-SAME: (double [[ARG0:%.*]]) #[[ATTR1]] {
921 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) double @llvm.ldexp.f64.i32(double [[ARG0]], i32 noundef 53) #[[ATTR10]]
922 ; CHECK-NEXT: ret double [[CALL]]
924 %call = call double @llvm.ldexp.f64.i32(double %arg0, i32 53)
928 define half @ret_ldexp_f16_8(half %arg0) #0 {
929 ; CHECK-LABEL: define half @ret_ldexp_f16_8
930 ; CHECK-SAME: (half [[ARG0:%.*]]) #[[ATTR1]] {
931 ; CHECK-NEXT: [[CALL:%.*]] = call half @llvm.ldexp.f16.i32(half [[ARG0]], i32 noundef 8) #[[ATTR10]]
932 ; CHECK-NEXT: ret half [[CALL]]
934 %call = call half @llvm.ldexp.f16.i32(half %arg0, i32 8)
938 define half @ret_ldexp_f16_9(half %arg0) #0 {
939 ; CHECK-LABEL: define half @ret_ldexp_f16_9
940 ; CHECK-SAME: (half [[ARG0:%.*]]) #[[ATTR1]] {
941 ; CHECK-NEXT: [[CALL:%.*]] = call half @llvm.ldexp.f16.i32(half [[ARG0]], i32 noundef 9) #[[ATTR10]]
942 ; CHECK-NEXT: ret half [[CALL]]
944 %call = call half @llvm.ldexp.f16.i32(half %arg0, i32 9)
948 define half @ret_ldexp_f16_10(half %arg0) #0 {
949 ; CHECK-LABEL: define nofpclass(sub) half @ret_ldexp_f16_10
950 ; CHECK-SAME: (half [[ARG0:%.*]]) #[[ATTR1]] {
951 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) half @llvm.ldexp.f16.i32(half [[ARG0]], i32 noundef 10) #[[ATTR10]]
952 ; CHECK-NEXT: ret half [[CALL]]
954 %call = call half @llvm.ldexp.f16.i32(half %arg0, i32 10)
958 define bfloat @ret_ldexp_bf16_6(bfloat %arg0) #0 {
959 ; CHECK-LABEL: define bfloat @ret_ldexp_bf16_6
960 ; CHECK-SAME: (bfloat [[ARG0:%.*]]) #[[ATTR1]] {
961 ; CHECK-NEXT: [[CALL:%.*]] = call bfloat @llvm.ldexp.bf16.i32(bfloat [[ARG0]], i32 noundef 6) #[[ATTR10]]
962 ; CHECK-NEXT: ret bfloat [[CALL]]
964 %call = call bfloat @llvm.ldexp.bf16.i32(bfloat %arg0, i32 6)
968 define bfloat @ret_ldexp_bf16_7(bfloat %arg0) #0 {
969 ; CHECK-LABEL: define nofpclass(sub) bfloat @ret_ldexp_bf16_7
970 ; CHECK-SAME: (bfloat [[ARG0:%.*]]) #[[ATTR1]] {
971 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) bfloat @llvm.ldexp.bf16.i32(bfloat [[ARG0]], i32 noundef 7) #[[ATTR10]]
972 ; CHECK-NEXT: ret bfloat [[CALL]]
974 %call = call bfloat @llvm.ldexp.bf16.i32(bfloat %arg0, i32 7)
978 define bfloat @ret_ldexp_bf16_8(bfloat %arg0) #0 {
979 ; CHECK-LABEL: define nofpclass(sub) bfloat @ret_ldexp_bf16_8
980 ; CHECK-SAME: (bfloat [[ARG0:%.*]]) #[[ATTR1]] {
981 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) bfloat @llvm.ldexp.bf16.i32(bfloat [[ARG0]], i32 noundef 8) #[[ATTR10]]
982 ; CHECK-NEXT: ret bfloat [[CALL]]
984 %call = call bfloat @llvm.ldexp.bf16.i32(bfloat %arg0, i32 8)
988 define float @ret_ldexp_f32_neg22(float %arg0) #0 {
989 ; CHECK-LABEL: define float @ret_ldexp_f32_neg22
990 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
991 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef -22) #[[ATTR10]]
992 ; CHECK-NEXT: ret float [[CALL]]
994 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 -22)
998 define float @ret_ldexp_f32_neg23(float %arg0) #0 {
999 ; CHECK-LABEL: define float @ret_ldexp_f32_neg23
1000 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
1001 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef -23) #[[ATTR10]]
1002 ; CHECK-NEXT: ret float [[CALL]]
1004 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 -23)
1008 define float @ret_ldexp_f32_neg24(float %arg0) #0 {
1009 ; CHECK-LABEL: define float @ret_ldexp_f32_neg24
1010 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
1011 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef -24) #[[ATTR10]]
1012 ; CHECK-NEXT: ret float [[CALL]]
1014 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 -24)
1018 define float @ret_ldexp_f32_neg126(float %arg0) #0 {
1019 ; CHECK-LABEL: define float @ret_ldexp_f32_neg126
1020 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
1021 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef -126) #[[ATTR10]]
1022 ; CHECK-NEXT: ret float [[CALL]]
1024 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 -126)
1028 define float @ret_ldexp_f32_neg127(float %arg0) #0 {
1029 ; CHECK-LABEL: define float @ret_ldexp_f32_neg127
1030 ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
1031 ; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ldexp.f32.i32(float [[ARG0]], i32 noundef -127) #[[ATTR10]]
1032 ; CHECK-NEXT: ret float [[CALL]]
1034 %call = call float @llvm.ldexp.f32.i32(float %arg0, i32 -127)
1038 attributes #0 = { "denormal-fp-math"="ieee,ieee" }
1039 attributes #1 = { "denormal-fp-math"="preserve-sign,preserve-sign" }
1040 attributes #2 = { "denormal-fp-math"="positive-zero,positive-zero" }
1041 attributes #3 = { "denormal-fp-math"="preserve-sign,ieee" }
1042 attributes #4 = { "denormal-fp-math"="ieee,dynamic" }
1043 attributes #5 = { "denormal-fp-math"="ieee,preserve-sign" }
1044 attributes #6 = { "denormal-fp-math"="dynamic,preserve-sign" }
1045 attributes #7 = { "denormal-fp-math"="dynamic,positive-zero" }
1046 attributes #8 = { "denormal-fp-math"="positive-zero,dynamic" }
1048 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: