1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -S -instcombine < %s | FileCheck %s
3
4define i1 @i32_cast_cmp_oeq_int_0_uitofp(i32 %i) {
5; CHECK-LABEL: @i32_cast_cmp_oeq_int_0_uitofp(
6; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
7; CHECK-NEXT:    ret i1 [[CMP]]
8;
9  %f = uitofp i32 %i to float
10  %cmp = fcmp oeq float %f, 0.0
11  ret i1 %cmp
12}
13
14define i1 @i32_cast_cmp_oeq_int_n0_uitofp(i32 %i) {
15; CHECK-LABEL: @i32_cast_cmp_oeq_int_n0_uitofp(
16; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
17; CHECK-NEXT:    ret i1 [[CMP]]
18;
19  %f = uitofp i32 %i to float
20  %cmp = fcmp oeq float %f, -0.0
21  ret i1 %cmp
22}
23
24define i1 @i32_cast_cmp_oeq_int_0_sitofp(i32 %i) {
25; CHECK-LABEL: @i32_cast_cmp_oeq_int_0_sitofp(
26; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
27; CHECK-NEXT:    ret i1 [[CMP]]
28;
29  %f = sitofp i32 %i to float
30  %cmp = fcmp oeq float %f, 0.0
31  ret i1 %cmp
32}
33
34define i1 @i32_cast_cmp_oeq_int_n0_sitofp(i32 %i) {
35; CHECK-LABEL: @i32_cast_cmp_oeq_int_n0_sitofp(
36; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
37; CHECK-NEXT:    ret i1 [[CMP]]
38;
39  %f = sitofp i32 %i to float
40  %cmp = fcmp oeq float %f, -0.0
41  ret i1 %cmp
42}
43
44define i1 @i32_cast_cmp_one_int_0_uitofp(i32 %i) {
45; CHECK-LABEL: @i32_cast_cmp_one_int_0_uitofp(
46; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
47; CHECK-NEXT:    ret i1 [[CMP]]
48;
49  %f = uitofp i32 %i to float
50  %cmp = fcmp one float %f, 0.0
51  ret i1 %cmp
52}
53
54define i1 @i32_cast_cmp_one_int_n0_uitofp(i32 %i) {
55; CHECK-LABEL: @i32_cast_cmp_one_int_n0_uitofp(
56; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
57; CHECK-NEXT:    ret i1 [[CMP]]
58;
59  %f = uitofp i32 %i to float
60  %cmp = fcmp one float %f, -0.0
61  ret i1 %cmp
62}
63
64define i1 @i32_cast_cmp_one_int_0_sitofp(i32 %i) {
65; CHECK-LABEL: @i32_cast_cmp_one_int_0_sitofp(
66; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
67; CHECK-NEXT:    ret i1 [[CMP]]
68;
69  %f = sitofp i32 %i to float
70  %cmp = fcmp one float %f, 0.0
71  ret i1 %cmp
72}
73
74define i1 @i32_cast_cmp_one_int_n0_sitofp(i32 %i) {
75; CHECK-LABEL: @i32_cast_cmp_one_int_n0_sitofp(
76; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
77; CHECK-NEXT:    ret i1 [[CMP]]
78;
79  %f = sitofp i32 %i to float
80  %cmp = fcmp one float %f, -0.0
81  ret i1 %cmp
82}
83
84define i1 @i32_cast_cmp_ueq_int_0_uitofp(i32 %i) {
85; CHECK-LABEL: @i32_cast_cmp_ueq_int_0_uitofp(
86; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
87; CHECK-NEXT:    ret i1 [[CMP]]
88;
89  %f = uitofp i32 %i to float
90  %cmp = fcmp ueq float %f, 0.0
91  ret i1 %cmp
92}
93
94define i1 @i32_cast_cmp_ueq_int_n0_uitofp(i32 %i) {
95; CHECK-LABEL: @i32_cast_cmp_ueq_int_n0_uitofp(
96; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
97; CHECK-NEXT:    ret i1 [[CMP]]
98;
99  %f = uitofp i32 %i to float
100  %cmp = fcmp ueq float %f, -0.0
101  ret i1 %cmp
102}
103
104define i1 @i32_cast_cmp_ueq_int_0_sitofp(i32 %i) {
105; CHECK-LABEL: @i32_cast_cmp_ueq_int_0_sitofp(
106; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
107; CHECK-NEXT:    ret i1 [[CMP]]
108;
109  %f = sitofp i32 %i to float
110  %cmp = fcmp ueq float %f, 0.0
111  ret i1 %cmp
112}
113
114define i1 @i32_cast_cmp_ueq_int_n0_sitofp(i32 %i) {
115; CHECK-LABEL: @i32_cast_cmp_ueq_int_n0_sitofp(
116; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
117; CHECK-NEXT:    ret i1 [[CMP]]
118;
119  %f = sitofp i32 %i to float
120  %cmp = fcmp ueq float %f, -0.0
121  ret i1 %cmp
122}
123
124define i1 @i32_cast_cmp_une_int_0_uitofp(i32 %i) {
125; CHECK-LABEL: @i32_cast_cmp_une_int_0_uitofp(
126; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
127; CHECK-NEXT:    ret i1 [[CMP]]
128;
129  %f = uitofp i32 %i to float
130  %cmp = fcmp une float %f, 0.0
131  ret i1 %cmp
132}
133
134define i1 @i32_cast_cmp_une_int_n0_uitofp(i32 %i) {
135; CHECK-LABEL: @i32_cast_cmp_une_int_n0_uitofp(
136; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
137; CHECK-NEXT:    ret i1 [[CMP]]
138;
139  %f = uitofp i32 %i to float
140  %cmp = fcmp une float %f, -0.0
141  ret i1 %cmp
142}
143
144define i1 @i32_cast_cmp_une_int_0_sitofp(i32 %i) {
145; CHECK-LABEL: @i32_cast_cmp_une_int_0_sitofp(
146; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
147; CHECK-NEXT:    ret i1 [[CMP]]
148;
149  %f = sitofp i32 %i to float
150  %cmp = fcmp une float %f, 0.0
151  ret i1 %cmp
152}
153
154define i1 @i32_cast_cmp_une_int_n0_sitofp(i32 %i) {
155; CHECK-LABEL: @i32_cast_cmp_une_int_n0_sitofp(
156; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
157; CHECK-NEXT:    ret i1 [[CMP]]
158;
159  %f = sitofp i32 %i to float
160  %cmp = fcmp une float %f, -0.0
161  ret i1 %cmp
162}
163
164define i1 @i32_cast_cmp_ogt_int_0_uitofp(i32 %i) {
165; CHECK-LABEL: @i32_cast_cmp_ogt_int_0_uitofp(
166; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
167; CHECK-NEXT:    ret i1 [[CMP]]
168;
169  %f = uitofp i32 %i to float
170  %cmp = fcmp ogt float %f, 0.0
171  ret i1 %cmp
172}
173
174define i1 @i32_cast_cmp_ogt_int_n0_uitofp(i32 %i) {
175; CHECK-LABEL: @i32_cast_cmp_ogt_int_n0_uitofp(
176; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0
177; CHECK-NEXT:    ret i1 [[CMP]]
178;
179  %f = uitofp i32 %i to float
180  %cmp = fcmp ogt float %f, -0.0
181  ret i1 %cmp
182}
183
184define i1 @i32_cast_cmp_ogt_int_0_sitofp(i32 %i) {
185; CHECK-LABEL: @i32_cast_cmp_ogt_int_0_sitofp(
186; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0
187; CHECK-NEXT:    ret i1 [[CMP]]
188;
189  %f = sitofp i32 %i to float
190  %cmp = fcmp ogt float %f, 0.0
191  ret i1 %cmp
192}
193
194define i1 @i32_cast_cmp_ogt_int_n0_sitofp(i32 %i) {
195; CHECK-LABEL: @i32_cast_cmp_ogt_int_n0_sitofp(
196; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0
197; CHECK-NEXT:    ret i1 [[CMP]]
198;
199  %f = sitofp i32 %i to float
200  %cmp = fcmp ogt float %f, -0.0
201  ret i1 %cmp
202}
203
204define i1 @i32_cast_cmp_ole_int_0_uitofp(i32 %i) {
205; CHECK-LABEL: @i32_cast_cmp_ole_int_0_uitofp(
206; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0
207; CHECK-NEXT:    ret i1 [[CMP]]
208;
209  %f = uitofp i32 %i to float
210  %cmp = fcmp ole float %f, 0.0
211  ret i1 %cmp
212}
213
214define i1 @i32_cast_cmp_ole_int_0_sitofp(i32 %i) {
215; CHECK-LABEL: @i32_cast_cmp_ole_int_0_sitofp(
216; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 1
217; CHECK-NEXT:    ret i1 [[CMP]]
218;
219  %f = sitofp i32 %i to float
220  %cmp = fcmp ole float %f, 0.0
221  ret i1 %cmp
222}
223
224define i1 @i32_cast_cmp_olt_int_0_sitofp(i32 %i) {
225; CHECK-LABEL: @i32_cast_cmp_olt_int_0_sitofp(
226; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 0
227; CHECK-NEXT:    ret i1 [[CMP]]
228;
229  %f = sitofp i32 %i to float
230  %cmp = fcmp olt float %f, 0.0
231  ret i1 %cmp
232}
233
234define i1 @i64_cast_cmp_oeq_int_0_uitofp(i64 %i) {
235; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_uitofp(
236; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0
237; CHECK-NEXT:    ret i1 [[CMP]]
238;
239  %f = uitofp i64 %i to float
240  %cmp = fcmp oeq float %f, 0.0
241  ret i1 %cmp
242}
243
244define i1 @i64_cast_cmp_oeq_int_0_sitofp(i64 %i) {
245; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_sitofp(
246; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0
247; CHECK-NEXT:    ret i1 [[CMP]]
248;
249  %f = sitofp i64 %i to float
250  %cmp = fcmp oeq float %f, 0.0
251  ret i1 %cmp
252}
253
254define i1 @i64_cast_cmp_oeq_int_0_uitofp_half(i64 %i) {
255; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_uitofp_half(
256; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0
257; CHECK-NEXT:    ret i1 [[CMP]]
258;
259  %f = uitofp i64 %i to half
260  %cmp = fcmp oeq half %f, 0.0
261  ret i1 %cmp
262}
263
264define i1 @i64_cast_cmp_oeq_int_0_sitofp_half(i64 %i) {
265; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_sitofp_half(
266; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0
267; CHECK-NEXT:    ret i1 [[CMP]]
268;
269  %f = sitofp i64 %i to half
270  %cmp = fcmp oeq half %f, 0.0
271  ret i1 %cmp
272}
273
274define i1 @i32_cast_cmp_oeq_int_0_uitofp_ppcf128(i32 %i) {
275; CHECK-LABEL: @i32_cast_cmp_oeq_int_0_uitofp_ppcf128(
276; CHECK-NEXT:    [[F:%.*]] = uitofp i32 [[I:%.*]] to ppc_fp128
277; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq ppc_fp128 [[F]], 0xM00000000000000000000000000000000
278; CHECK-NEXT:    ret i1 [[CMP]]
279;
280  %f = uitofp i32 %i to ppc_fp128
281  %cmp = fcmp oeq ppc_fp128 %f, 0xM00000000000000000000000000000000
282  ret i1 %cmp
283}
284
285; Since 0xFFFFFF fits in a float, and one less and
286; one more than it also fits without rounding, the
287; test can be optimized to an integer compare.
288
289define i1 @i32_cast_cmp_oeq_int_i24max_uitofp(i32 %i) {
290; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24max_uitofp(
291; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 16777215
292; CHECK-NEXT:    ret i1 [[CMP]]
293;
294  %f = uitofp i32 %i to float
295  %cmp = fcmp oeq float %f, 0x416FFFFFE0000000
296  ret i1 %cmp
297}
298
299define i1 @i32_cast_cmp_oeq_int_i24max_sitofp(i32 %i) {
300; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24max_sitofp(
301; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 16777215
302; CHECK-NEXT:    ret i1 [[CMP]]
303;
304  %f = sitofp i32 %i to float
305  %cmp = fcmp oeq float %f, 0x416FFFFFE0000000
306  ret i1 %cmp
307}
308
309; Though 0x1000000 fits in a float, one more than it
310; would round to it too, hence a single integer comparison
311; does not suffice.
312
313
314define i1 @i32_cast_cmp_oeq_int_i24maxp1_uitofp(i32 %i) {
315; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24maxp1_uitofp(
316; CHECK-NEXT:    [[F:%.*]] = uitofp i32 [[I:%.*]] to float
317; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0x4170000000000000
318; CHECK-NEXT:    ret i1 [[CMP]]
319;
320  %f = uitofp i32 %i to float
321  %cmp = fcmp oeq float %f, 0x4170000000000000
322  ret i1 %cmp
323}
324
325
326define i1 @i32_cast_cmp_oeq_int_i24maxp1_sitofp(i32 %i) {
327; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24maxp1_sitofp(
328; CHECK-NEXT:    [[F:%.*]] = sitofp i32 [[I:%.*]] to float
329; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0x4170000000000000
330; CHECK-NEXT:    ret i1 [[CMP]]
331;
332  %f = sitofp i32 %i to float
333  %cmp = fcmp oeq float %f, 0x4170000000000000
334  ret i1 %cmp
335}
336
337define i1 @i32_cast_cmp_oeq_int_i32umax_uitofp(i32 %i) {
338; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32umax_uitofp(
339; CHECK-NEXT:    [[F:%.*]] = uitofp i32 [[I:%.*]] to float
340; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0x41F0000000000000
341; CHECK-NEXT:    ret i1 [[CMP]]
342;
343  %f = uitofp i32 %i to float
344  %cmp = fcmp oeq float %f, 0x41F0000000000000
345  ret i1 %cmp
346}
347
348; 32-bit unsigned integer cannot possibly round up to 1<<33
349define i1 @i32_cast_cmp_oeq_int_big_uitofp(i32 %i) {
350; CHECK-LABEL: @i32_cast_cmp_oeq_int_big_uitofp(
351; CHECK-NEXT:    ret i1 false
352;
353  %f = uitofp i32 %i to float
354  %cmp = fcmp oeq float %f, 0x4200000000000000
355  ret i1 %cmp
356}
357
358; 32-bit signed integer cannot possibly round up to 1<<32
359define i1 @i32_cast_cmp_oeq_int_i32umax_sitofp(i32 %i) {
360; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32umax_sitofp(
361; CHECK-NEXT:    ret i1 false
362;
363  %f = sitofp i32 %i to float
364  %cmp = fcmp oeq float %f, 0x41F0000000000000
365  ret i1 %cmp
366}
367
368define i1 @i32_cast_cmp_oeq_int_i32imin_sitofp(i32 %i) {
369; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32imin_sitofp(
370; CHECK-NEXT:    [[F:%.*]] = sitofp i32 [[I:%.*]] to float
371; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0xC1E0000000000000
372; CHECK-NEXT:    ret i1 [[CMP]]
373;
374  %f = sitofp i32 %i to float
375  %cmp = fcmp oeq float %f, 0xC1E0000000000000
376  ret i1 %cmp
377}
378
379define i1 @i32_cast_cmp_oeq_int_i32imax_uitofp(i32 %i) {
380; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32imax_uitofp(
381; CHECK-NEXT:    [[F:%.*]] = uitofp i32 [[I:%.*]] to float
382; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0x41E0000000000000
383; CHECK-NEXT:    ret i1 [[CMP]]
384;
385  %f = uitofp i32 %i to float
386  %cmp = fcmp oeq float %f, 0x41E0000000000000
387  ret i1 %cmp
388}
389
390define i1 @i32_cast_cmp_oeq_int_i32imax_sitofp(i32 %i) {
391; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32imax_sitofp(
392; CHECK-NEXT:    [[F:%.*]] = sitofp i32 [[I:%.*]] to float
393; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0x41E0000000000000
394; CHECK-NEXT:    ret i1 [[CMP]]
395;
396  %f = sitofp i32 %i to float
397  %cmp = fcmp oeq float %f, 0x41E0000000000000
398  ret i1 %cmp
399}
400
401; 32-bit signed integer cannot possibly round to -1<<32
402define i1 @i32_cast_cmp_oeq_int_negi32umax_sitofp(i32 %i) {
403; CHECK-LABEL: @i32_cast_cmp_oeq_int_negi32umax_sitofp(
404; CHECK-NEXT:    ret i1 false
405;
406  %f = sitofp i32 %i to float
407  %cmp = fcmp oeq float %f, 0xC1F0000000000000
408  ret i1 %cmp
409}
410
411define i1 @i32_cast_cmp_oeq_half_uitofp(i32 %i) {
412; CHECK-LABEL: @i32_cast_cmp_oeq_half_uitofp(
413; CHECK-NEXT:    ret i1 false
414;
415  %f = uitofp i32 %i to float
416  %cmp = fcmp oeq float %f, 0.5
417  ret i1 %cmp
418}
419
420define i1 @i32_cast_cmp_oeq_half_sitofp(i32 %i) {
421; CHECK-LABEL: @i32_cast_cmp_oeq_half_sitofp(
422; CHECK-NEXT:    ret i1 false
423;
424  %f = sitofp i32 %i to float
425  %cmp = fcmp oeq float %f, 0.5
426  ret i1 %cmp
427}
428
429define i1 @i32_cast_cmp_one_half_uitofp(i32 %i) {
430; CHECK-LABEL: @i32_cast_cmp_one_half_uitofp(
431; CHECK-NEXT:    ret i1 true
432;
433  %f = uitofp i32 %i to float
434  %cmp = fcmp one float %f, 0.5
435  ret i1 %cmp
436}
437
438define i1 @i32_cast_cmp_one_half_sitofp(i32 %i) {
439; CHECK-LABEL: @i32_cast_cmp_one_half_sitofp(
440; CHECK-NEXT:    ret i1 true
441;
442  %f = sitofp i32 %i to float
443  %cmp = fcmp one float %f, 0.5
444  ret i1 %cmp
445}
446
447define i1 @i32_cast_cmp_ueq_half_uitofp(i32 %i) {
448; CHECK-LABEL: @i32_cast_cmp_ueq_half_uitofp(
449; CHECK-NEXT:    ret i1 false
450;
451  %f = uitofp i32 %i to float
452  %cmp = fcmp ueq float %f, 0.5
453  ret i1 %cmp
454}
455
456define i1 @i32_cast_cmp_ueq_half_sitofp(i32 %i) {
457; CHECK-LABEL: @i32_cast_cmp_ueq_half_sitofp(
458; CHECK-NEXT:    ret i1 false
459;
460  %f = sitofp i32 %i to float
461  %cmp = fcmp ueq float %f, 0.5
462  ret i1 %cmp
463}
464
465define i1 @i32_cast_cmp_une_half_uitofp(i32 %i) {
466; CHECK-LABEL: @i32_cast_cmp_une_half_uitofp(
467; CHECK-NEXT:    ret i1 true
468;
469  %f = uitofp i32 %i to float
470  %cmp = fcmp une float %f, 0.5
471  ret i1 %cmp
472}
473
474define i1 @i32_cast_cmp_une_half_sitofp(i32 %i) {
475; CHECK-LABEL: @i32_cast_cmp_une_half_sitofp(
476; CHECK-NEXT:    ret i1 true
477;
478  %f = sitofp i32 %i to float
479  %cmp = fcmp une float %f, 0.5
480  ret i1 %cmp
481}
482
483define i1 @i32_cast_cmp_oeq_int_inf_uitofp(i32 %i) {
484; CHECK-LABEL: @i32_cast_cmp_oeq_int_inf_uitofp(
485; CHECK-NEXT:    ret i1 false
486;
487  %f = uitofp i32 %i to float
488  %cmp = fcmp oeq float %f, 0x7FF0000000000000
489  ret i1 %cmp
490}
491
492define i1 @i32_cast_cmp_oeq_int_inf_sitofp(i32 %i) {
493; CHECK-LABEL: @i32_cast_cmp_oeq_int_inf_sitofp(
494; CHECK-NEXT:    ret i1 false
495;
496  %f = sitofp i32 %i to float
497  %cmp = fcmp oeq float %f, 0x7FF0000000000000
498  ret i1 %cmp
499}
500
501; An i128 could round to an IEEE single-precision infinity.
502define i1 @i128_cast_cmp_oeq_int_inf_uitofp(i128 %i) {
503; CHECK-LABEL: @i128_cast_cmp_oeq_int_inf_uitofp(
504; CHECK-NEXT:    [[F:%.*]] = uitofp i128 [[I:%.*]] to float
505; CHECK-NEXT:    [[CMP:%.*]] = fcmp oeq float [[F]], 0x7FF0000000000000
506; CHECK-NEXT:    ret i1 [[CMP]]
507;
508  %f = uitofp i128 %i to float
509  %cmp = fcmp oeq float %f, 0x7FF0000000000000
510  ret i1 %cmp
511}
512