1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
2 ; RUN: opt -S -passes=instsimplify %s | FileCheck %s
4 ; Test that we're able to make use of assumes of fcmps with constants
5 ; that aren't 0/inf/smallest-normal. Range checks can exclude certain
8 declare void @llvm.assume(i1 noundef) #0
9 declare float @llvm.fabs.f32(float) #0
11 ; --------------------------------------------------------------------
12 ; Test assume x < -1.0 with compares to 0
13 ; --------------------------------------------------------------------
15 define i1 @assume_olt_neg1__oeq_0(float %arg) {
16 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_0(
17 ; CHECK-SAME: float [[ARG:%.*]]) {
18 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
19 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
20 ; CHECK-NEXT: ret i1 false
22 %olt.neg1 = fcmp olt float %arg, -1.0
23 call void @llvm.assume(i1 %olt.neg1)
24 %cmp = fcmp oeq float %arg, 0.0
28 define i1 @assume_olt_neg1__ogt_0(float %arg) {
29 ; CHECK-LABEL: define i1 @assume_olt_neg1__ogt_0(
30 ; CHECK-SAME: float [[ARG:%.*]]) {
31 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
32 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
33 ; CHECK-NEXT: ret i1 false
35 %olt.neg1 = fcmp olt float %arg, -1.0
36 call void @llvm.assume(i1 %olt.neg1)
37 %cmp = fcmp ogt float %arg, 0.0
41 define i1 @assume_olt_neg1__oge_0(float %arg) {
42 ; CHECK-LABEL: define i1 @assume_olt_neg1__oge_0(
43 ; CHECK-SAME: float [[ARG:%.*]]) {
44 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
45 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
46 ; CHECK-NEXT: ret i1 false
48 %olt.neg1 = fcmp olt float %arg, -1.0
49 call void @llvm.assume(i1 %olt.neg1)
50 %cmp = fcmp oge float %arg, 0.0
54 define i1 @assume_olt_neg1__olt_0(float %arg) {
55 ; CHECK-LABEL: define i1 @assume_olt_neg1__olt_0(
56 ; CHECK-SAME: float [[ARG:%.*]]) {
57 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
58 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
59 ; CHECK-NEXT: ret i1 true
61 %olt.neg1 = fcmp olt float %arg, -1.0
62 call void @llvm.assume(i1 %olt.neg1)
63 %cmp = fcmp olt float %arg, 0.0
67 define i1 @assume_olt_neg1__ole_0(float %arg) {
68 ; CHECK-LABEL: define i1 @assume_olt_neg1__ole_0(
69 ; CHECK-SAME: float [[ARG:%.*]]) {
70 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
71 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
72 ; CHECK-NEXT: ret i1 true
74 %olt.neg1 = fcmp olt float %arg, -1.0
75 call void @llvm.assume(i1 %olt.neg1)
76 %cmp = fcmp ole float %arg, 0.0
80 define i1 @assume_olt_neg1__one_0(float %arg) {
81 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_0(
82 ; CHECK-SAME: float [[ARG:%.*]]) {
83 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
84 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
85 ; CHECK-NEXT: ret i1 true
87 %olt.neg1 = fcmp olt float %arg, -1.0
88 call void @llvm.assume(i1 %olt.neg1)
89 %cmp = fcmp one float %arg, 0.0
93 define i1 @assume_olt_neg1__ord_0(float %arg) {
94 ; CHECK-LABEL: define i1 @assume_olt_neg1__ord_0(
95 ; CHECK-SAME: float [[ARG:%.*]]) {
96 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
97 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
98 ; CHECK-NEXT: ret i1 true
100 %olt.neg1 = fcmp olt float %arg, -1.0
101 call void @llvm.assume(i1 %olt.neg1)
102 %cmp = fcmp ord float %arg, 0.0
106 define i1 @assume_olt_neg1__ueq_0(float %arg) {
107 ; CHECK-LABEL: define i1 @assume_olt_neg1__ueq_0(
108 ; CHECK-SAME: float [[ARG:%.*]]) {
109 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
110 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
111 ; CHECK-NEXT: ret i1 false
113 %olt.neg1 = fcmp olt float %arg, -1.0
114 call void @llvm.assume(i1 %olt.neg1)
115 %cmp = fcmp ueq float %arg, 0.0
119 define i1 @assume_olt_neg1__ugt_0(float %arg) {
120 ; CHECK-LABEL: define i1 @assume_olt_neg1__ugt_0(
121 ; CHECK-SAME: float [[ARG:%.*]]) {
122 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
123 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
124 ; CHECK-NEXT: ret i1 false
126 %olt.neg1 = fcmp olt float %arg, -1.0
127 call void @llvm.assume(i1 %olt.neg1)
128 %cmp = fcmp ugt float %arg, 0.0
132 define i1 @assume_olt_neg1__uge_0(float %arg) {
133 ; CHECK-LABEL: define i1 @assume_olt_neg1__uge_0(
134 ; CHECK-SAME: float [[ARG:%.*]]) {
135 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
136 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
137 ; CHECK-NEXT: ret i1 false
139 %olt.neg1 = fcmp olt float %arg, -1.0
140 call void @llvm.assume(i1 %olt.neg1)
141 %cmp = fcmp uge float %arg, 0.0
145 define i1 @assume_olt_neg1__ult_0(float %arg) {
146 ; CHECK-LABEL: define i1 @assume_olt_neg1__ult_0(
147 ; CHECK-SAME: float [[ARG:%.*]]) {
148 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
149 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
150 ; CHECK-NEXT: ret i1 true
152 %olt.neg1 = fcmp olt float %arg, -1.0
153 call void @llvm.assume(i1 %olt.neg1)
154 %cmp = fcmp ult float %arg, 0.0
158 define i1 @assume_olt_neg1__ule_0(float %arg) {
159 ; CHECK-LABEL: define i1 @assume_olt_neg1__ule_0(
160 ; CHECK-SAME: float [[ARG:%.*]]) {
161 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
162 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
163 ; CHECK-NEXT: ret i1 true
165 %olt.neg1 = fcmp olt float %arg, -1.0
166 call void @llvm.assume(i1 %olt.neg1)
167 %cmp = fcmp ule float %arg, 0.0
171 define i1 @assume_olt_neg1__une_0(float %arg) {
172 ; CHECK-LABEL: define i1 @assume_olt_neg1__une_0(
173 ; CHECK-SAME: float [[ARG:%.*]]) {
174 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
175 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
176 ; CHECK-NEXT: ret i1 true
178 %olt.neg1 = fcmp olt float %arg, -1.0
179 call void @llvm.assume(i1 %olt.neg1)
180 %cmp = fcmp une float %arg, 0.0
184 define i1 @assume_olt_neg1__uno_0(float %arg) {
185 ; CHECK-LABEL: define i1 @assume_olt_neg1__uno_0(
186 ; CHECK-SAME: float [[ARG:%.*]]) {
187 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
188 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
189 ; CHECK-NEXT: ret i1 false
191 %olt.neg1 = fcmp olt float %arg, -1.0
192 call void @llvm.assume(i1 %olt.neg1)
193 %cmp = fcmp uno float %arg, 0.0
197 ; --------------------------------------------------------------------
198 ; Test assume x <= -1.0 with compares to 0
199 ; --------------------------------------------------------------------
201 define i1 @assume_ole_neg1__oeq_0(float %arg) {
202 ; CHECK-LABEL: define i1 @assume_ole_neg1__oeq_0(
203 ; CHECK-SAME: float [[ARG:%.*]]) {
204 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
205 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
206 ; CHECK-NEXT: ret i1 false
208 %ole.neg1 = fcmp ole float %arg, -1.0
209 call void @llvm.assume(i1 %ole.neg1)
210 %cmp = fcmp oeq float %arg, 0.0
214 define i1 @assume_ole_neg1__ogt_0(float %arg) {
215 ; CHECK-LABEL: define i1 @assume_ole_neg1__ogt_0(
216 ; CHECK-SAME: float [[ARG:%.*]]) {
217 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
218 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
219 ; CHECK-NEXT: ret i1 false
221 %ole.neg1 = fcmp ole float %arg, -1.0
222 call void @llvm.assume(i1 %ole.neg1)
223 %cmp = fcmp ogt float %arg, 0.0
227 define i1 @assume_ole_neg1__oge_0(float %arg) {
228 ; CHECK-LABEL: define i1 @assume_ole_neg1__oge_0(
229 ; CHECK-SAME: float [[ARG:%.*]]) {
230 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
231 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
232 ; CHECK-NEXT: ret i1 false
234 %ole.neg1 = fcmp ole float %arg, -1.0
235 call void @llvm.assume(i1 %ole.neg1)
236 %cmp = fcmp oge float %arg, 0.0
240 define i1 @assume_ole_neg1__olt_0(float %arg) {
241 ; CHECK-LABEL: define i1 @assume_ole_neg1__olt_0(
242 ; CHECK-SAME: float [[ARG:%.*]]) {
243 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
244 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
245 ; CHECK-NEXT: ret i1 true
247 %ole.neg1 = fcmp ole float %arg, -1.0
248 call void @llvm.assume(i1 %ole.neg1)
249 %cmp = fcmp olt float %arg, 0.0
253 define i1 @assume_ole_neg1__ole_0(float %arg) {
254 ; CHECK-LABEL: define i1 @assume_ole_neg1__ole_0(
255 ; CHECK-SAME: float [[ARG:%.*]]) {
256 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
257 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
258 ; CHECK-NEXT: ret i1 true
260 %ole.neg1 = fcmp ole float %arg, -1.0
261 call void @llvm.assume(i1 %ole.neg1)
262 %cmp = fcmp ole float %arg, 0.0
266 define i1 @assume_ole_neg1__one_0(float %arg) {
267 ; CHECK-LABEL: define i1 @assume_ole_neg1__one_0(
268 ; CHECK-SAME: float [[ARG:%.*]]) {
269 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
270 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
271 ; CHECK-NEXT: ret i1 true
273 %ole.neg1 = fcmp ole float %arg, -1.0
274 call void @llvm.assume(i1 %ole.neg1)
275 %cmp = fcmp one float %arg, 0.0
279 define i1 @assume_ole_neg1__ord_0(float %arg) {
280 ; CHECK-LABEL: define i1 @assume_ole_neg1__ord_0(
281 ; CHECK-SAME: float [[ARG:%.*]]) {
282 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
283 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
284 ; CHECK-NEXT: ret i1 true
286 %ole.neg1 = fcmp ole float %arg, -1.0
287 call void @llvm.assume(i1 %ole.neg1)
288 %cmp = fcmp ord float %arg, 0.0
292 define i1 @assume_ole_neg1__ueq_0(float %arg) {
293 ; CHECK-LABEL: define i1 @assume_ole_neg1__ueq_0(
294 ; CHECK-SAME: float [[ARG:%.*]]) {
295 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
296 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
297 ; CHECK-NEXT: ret i1 false
299 %ole.neg1 = fcmp ole float %arg, -1.0
300 call void @llvm.assume(i1 %ole.neg1)
301 %cmp = fcmp ueq float %arg, 0.0
305 define i1 @assume_ole_neg1__ugt_0(float %arg) {
306 ; CHECK-LABEL: define i1 @assume_ole_neg1__ugt_0(
307 ; CHECK-SAME: float [[ARG:%.*]]) {
308 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
309 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
310 ; CHECK-NEXT: ret i1 false
312 %ole.neg1 = fcmp ole float %arg, -1.0
313 call void @llvm.assume(i1 %ole.neg1)
314 %cmp = fcmp ugt float %arg, 0.0
318 define i1 @assume_ole_neg1__uge_0(float %arg) {
319 ; CHECK-LABEL: define i1 @assume_ole_neg1__uge_0(
320 ; CHECK-SAME: float [[ARG:%.*]]) {
321 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
322 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
323 ; CHECK-NEXT: ret i1 false
325 %ole.neg1 = fcmp ole float %arg, -1.0
326 call void @llvm.assume(i1 %ole.neg1)
327 %cmp = fcmp uge float %arg, 0.0
331 define i1 @assume_ole_neg1__ult_0(float %arg) {
332 ; CHECK-LABEL: define i1 @assume_ole_neg1__ult_0(
333 ; CHECK-SAME: float [[ARG:%.*]]) {
334 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
335 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
336 ; CHECK-NEXT: ret i1 true
338 %ole.neg1 = fcmp ole float %arg, -1.0
339 call void @llvm.assume(i1 %ole.neg1)
340 %cmp = fcmp ult float %arg, 0.0
344 define i1 @assume_ole_neg1__ule_0(float %arg) {
345 ; CHECK-LABEL: define i1 @assume_ole_neg1__ule_0(
346 ; CHECK-SAME: float [[ARG:%.*]]) {
347 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
348 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
349 ; CHECK-NEXT: ret i1 true
351 %ole.neg1 = fcmp ole float %arg, -1.0
352 call void @llvm.assume(i1 %ole.neg1)
353 %cmp = fcmp ule float %arg, 0.0
357 define i1 @assume_ole_neg1__une_0(float %arg) {
358 ; CHECK-LABEL: define i1 @assume_ole_neg1__une_0(
359 ; CHECK-SAME: float [[ARG:%.*]]) {
360 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
361 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
362 ; CHECK-NEXT: ret i1 true
364 %ole.neg1 = fcmp ole float %arg, -1.0
365 call void @llvm.assume(i1 %ole.neg1)
366 %cmp = fcmp une float %arg, 0.0
370 define i1 @assume_ole_neg1__uno_0(float %arg) {
371 ; CHECK-LABEL: define i1 @assume_ole_neg1__uno_0(
372 ; CHECK-SAME: float [[ARG:%.*]]) {
373 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
374 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
375 ; CHECK-NEXT: ret i1 false
377 %ole.neg1 = fcmp ole float %arg, -1.0
378 call void @llvm.assume(i1 %ole.neg1)
379 %cmp = fcmp uno float %arg, 0.0
383 ; --------------------------------------------------------------------
384 ; Test assume x > -1.0 with compares to 0
385 ; --------------------------------------------------------------------
387 define i1 @assume_ogt_neg1__oeq_0(float %arg) {
388 ; CHECK-LABEL: define i1 @assume_ogt_neg1__oeq_0(
389 ; CHECK-SAME: float [[ARG:%.*]]) {
390 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
391 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
392 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
393 ; CHECK-NEXT: ret i1 [[CMP]]
395 %ogt.neg1 = fcmp ogt float %arg, -1.0
396 call void @llvm.assume(i1 %ogt.neg1)
397 %cmp = fcmp oeq float %arg, 0.0
401 define i1 @assume_ogt_neg1__ogt_0(float %arg) {
402 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ogt_0(
403 ; CHECK-SAME: float [[ARG:%.*]]) {
404 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
405 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
406 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
407 ; CHECK-NEXT: ret i1 [[CMP]]
409 %ogt.neg1 = fcmp ogt float %arg, -1.0
410 call void @llvm.assume(i1 %ogt.neg1)
411 %cmp = fcmp ogt float %arg, 0.0
415 define i1 @assume_ogt_neg1__oge_0(float %arg) {
416 ; CHECK-LABEL: define i1 @assume_ogt_neg1__oge_0(
417 ; CHECK-SAME: float [[ARG:%.*]]) {
418 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
419 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
420 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
421 ; CHECK-NEXT: ret i1 [[CMP]]
423 %ogt.neg1 = fcmp ogt float %arg, -1.0
424 call void @llvm.assume(i1 %ogt.neg1)
425 %cmp = fcmp oge float %arg, 0.0
429 define i1 @assume_ogt_neg1__olt_0(float %arg) {
430 ; CHECK-LABEL: define i1 @assume_ogt_neg1__olt_0(
431 ; CHECK-SAME: float [[ARG:%.*]]) {
432 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
433 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
434 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
435 ; CHECK-NEXT: ret i1 [[CMP]]
437 %ogt.neg1 = fcmp ogt float %arg, -1.0
438 call void @llvm.assume(i1 %ogt.neg1)
439 %cmp = fcmp olt float %arg, 0.0
443 define i1 @assume_ogt_neg1__ole_0(float %arg) {
444 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ole_0(
445 ; CHECK-SAME: float [[ARG:%.*]]) {
446 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
447 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
448 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
449 ; CHECK-NEXT: ret i1 [[CMP]]
451 %ogt.neg1 = fcmp ogt float %arg, -1.0
452 call void @llvm.assume(i1 %ogt.neg1)
453 %cmp = fcmp ole float %arg, 0.0
457 define i1 @assume_ogt_neg1__one_0(float %arg) {
458 ; CHECK-LABEL: define i1 @assume_ogt_neg1__one_0(
459 ; CHECK-SAME: float [[ARG:%.*]]) {
460 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
461 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
462 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
463 ; CHECK-NEXT: ret i1 [[CMP]]
465 %ogt.neg1 = fcmp ogt float %arg, -1.0
466 call void @llvm.assume(i1 %ogt.neg1)
467 %cmp = fcmp one float %arg, 0.0
471 define i1 @assume_ogt_neg1__ord_0(float %arg) {
472 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ord_0(
473 ; CHECK-SAME: float [[ARG:%.*]]) {
474 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
475 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
476 ; CHECK-NEXT: ret i1 true
478 %ogt.neg1 = fcmp ogt float %arg, -1.0
479 call void @llvm.assume(i1 %ogt.neg1)
480 %cmp = fcmp ord float %arg, 0.0
484 define i1 @assume_ogt_neg1__ueq_0(float %arg) {
485 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ueq_0(
486 ; CHECK-SAME: float [[ARG:%.*]]) {
487 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
488 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
489 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
490 ; CHECK-NEXT: ret i1 [[CMP]]
492 %ogt.neg1 = fcmp ogt float %arg, -1.0
493 call void @llvm.assume(i1 %ogt.neg1)
494 %cmp = fcmp ueq float %arg, 0.0
498 define i1 @assume_ogt_neg1__ugt_0(float %arg) {
499 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ugt_0(
500 ; CHECK-SAME: float [[ARG:%.*]]) {
501 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
502 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
503 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
504 ; CHECK-NEXT: ret i1 [[CMP]]
506 %ogt.neg1 = fcmp ogt float %arg, -1.0
507 call void @llvm.assume(i1 %ogt.neg1)
508 %cmp = fcmp ugt float %arg, 0.0
512 define i1 @assume_ogt_neg1__uge_0(float %arg) {
513 ; CHECK-LABEL: define i1 @assume_ogt_neg1__uge_0(
514 ; CHECK-SAME: float [[ARG:%.*]]) {
515 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
516 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
517 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
518 ; CHECK-NEXT: ret i1 [[CMP]]
520 %ogt.neg1 = fcmp ogt float %arg, -1.0
521 call void @llvm.assume(i1 %ogt.neg1)
522 %cmp = fcmp uge float %arg, 0.0
526 define i1 @assume_ogt_neg1__ult_0(float %arg) {
527 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ult_0(
528 ; CHECK-SAME: float [[ARG:%.*]]) {
529 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
530 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
531 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
532 ; CHECK-NEXT: ret i1 [[CMP]]
534 %ogt.neg1 = fcmp ogt float %arg, -1.0
535 call void @llvm.assume(i1 %ogt.neg1)
536 %cmp = fcmp ult float %arg, 0.0
540 define i1 @assume_ogt_neg1__ule_0(float %arg) {
541 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ule_0(
542 ; CHECK-SAME: float [[ARG:%.*]]) {
543 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
544 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
545 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
546 ; CHECK-NEXT: ret i1 [[CMP]]
548 %ogt.neg1 = fcmp ogt float %arg, -1.0
549 call void @llvm.assume(i1 %ogt.neg1)
550 %cmp = fcmp ule float %arg, 0.0
554 define i1 @assume_ogt_neg1__une_0(float %arg) {
555 ; CHECK-LABEL: define i1 @assume_ogt_neg1__une_0(
556 ; CHECK-SAME: float [[ARG:%.*]]) {
557 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
558 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
559 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
560 ; CHECK-NEXT: ret i1 [[CMP]]
562 %ogt.neg1 = fcmp ogt float %arg, -1.0
563 call void @llvm.assume(i1 %ogt.neg1)
564 %cmp = fcmp une float %arg, 0.0
568 define i1 @assume_ogt_neg1__uno_0(float %arg) {
569 ; CHECK-LABEL: define i1 @assume_ogt_neg1__uno_0(
570 ; CHECK-SAME: float [[ARG:%.*]]) {
571 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
572 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
573 ; CHECK-NEXT: ret i1 false
575 %ogt.neg1 = fcmp ogt float %arg, -1.0
576 call void @llvm.assume(i1 %ogt.neg1)
577 %cmp = fcmp uno float %arg, 0.0
581 ; --------------------------------------------------------------------
582 ; Test assume x >= -1.0 with compares to 0
583 ; --------------------------------------------------------------------
585 define i1 @assume_oge_neg1__oeq_0(float %arg) {
586 ; CHECK-LABEL: define i1 @assume_oge_neg1__oeq_0(
587 ; CHECK-SAME: float [[ARG:%.*]]) {
588 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
589 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
590 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
591 ; CHECK-NEXT: ret i1 [[CMP]]
593 %oge.neg1 = fcmp oge float %arg, -1.0
594 call void @llvm.assume(i1 %oge.neg1)
595 %cmp = fcmp oeq float %arg, 0.0
599 define i1 @assume_oge_neg1__ogt_0(float %arg) {
600 ; CHECK-LABEL: define i1 @assume_oge_neg1__ogt_0(
601 ; CHECK-SAME: float [[ARG:%.*]]) {
602 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
603 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
604 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
605 ; CHECK-NEXT: ret i1 [[CMP]]
607 %oge.neg1 = fcmp oge float %arg, -1.0
608 call void @llvm.assume(i1 %oge.neg1)
609 %cmp = fcmp ogt float %arg, 0.0
613 define i1 @assume_oge_neg1__oge_0(float %arg) {
614 ; CHECK-LABEL: define i1 @assume_oge_neg1__oge_0(
615 ; CHECK-SAME: float [[ARG:%.*]]) {
616 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
617 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
618 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
619 ; CHECK-NEXT: ret i1 [[CMP]]
621 %oge.neg1 = fcmp oge float %arg, -1.0
622 call void @llvm.assume(i1 %oge.neg1)
623 %cmp = fcmp oge float %arg, 0.0
627 define i1 @assume_oge_neg1__olt_0(float %arg) {
628 ; CHECK-LABEL: define i1 @assume_oge_neg1__olt_0(
629 ; CHECK-SAME: float [[ARG:%.*]]) {
630 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
631 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
632 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
633 ; CHECK-NEXT: ret i1 [[CMP]]
635 %oge.neg1 = fcmp oge float %arg, -1.0
636 call void @llvm.assume(i1 %oge.neg1)
637 %cmp = fcmp olt float %arg, 0.0
641 define i1 @assume_oge_neg1__ole_0(float %arg) {
642 ; CHECK-LABEL: define i1 @assume_oge_neg1__ole_0(
643 ; CHECK-SAME: float [[ARG:%.*]]) {
644 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
645 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
646 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
647 ; CHECK-NEXT: ret i1 [[CMP]]
649 %oge.neg1 = fcmp oge float %arg, -1.0
650 call void @llvm.assume(i1 %oge.neg1)
651 %cmp = fcmp ole float %arg, 0.0
655 define i1 @assume_oge_neg1__one_0(float %arg) {
656 ; CHECK-LABEL: define i1 @assume_oge_neg1__one_0(
657 ; CHECK-SAME: float [[ARG:%.*]]) {
658 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
659 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
660 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
661 ; CHECK-NEXT: ret i1 [[CMP]]
663 %oge.neg1 = fcmp oge float %arg, -1.0
664 call void @llvm.assume(i1 %oge.neg1)
665 %cmp = fcmp one float %arg, 0.0
669 define i1 @assume_oge_neg1__ord_0(float %arg) {
670 ; CHECK-LABEL: define i1 @assume_oge_neg1__ord_0(
671 ; CHECK-SAME: float [[ARG:%.*]]) {
672 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
673 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
674 ; CHECK-NEXT: ret i1 true
676 %oge.neg1 = fcmp oge float %arg, -1.0
677 call void @llvm.assume(i1 %oge.neg1)
678 %cmp = fcmp ord float %arg, 0.0
682 define i1 @assume_oge_neg1__ueq_0(float %arg) {
683 ; CHECK-LABEL: define i1 @assume_oge_neg1__ueq_0(
684 ; CHECK-SAME: float [[ARG:%.*]]) {
685 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
686 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
687 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
688 ; CHECK-NEXT: ret i1 [[CMP]]
690 %oge.neg1 = fcmp oge float %arg, -1.0
691 call void @llvm.assume(i1 %oge.neg1)
692 %cmp = fcmp ueq float %arg, 0.0
696 define i1 @assume_oge_neg1__ugt_0(float %arg) {
697 ; CHECK-LABEL: define i1 @assume_oge_neg1__ugt_0(
698 ; CHECK-SAME: float [[ARG:%.*]]) {
699 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
700 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
701 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
702 ; CHECK-NEXT: ret i1 [[CMP]]
704 %oge.neg1 = fcmp oge float %arg, -1.0
705 call void @llvm.assume(i1 %oge.neg1)
706 %cmp = fcmp ugt float %arg, 0.0
710 define i1 @assume_oge_neg1__uge_0(float %arg) {
711 ; CHECK-LABEL: define i1 @assume_oge_neg1__uge_0(
712 ; CHECK-SAME: float [[ARG:%.*]]) {
713 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
714 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
715 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
716 ; CHECK-NEXT: ret i1 [[CMP]]
718 %oge.neg1 = fcmp oge float %arg, -1.0
719 call void @llvm.assume(i1 %oge.neg1)
720 %cmp = fcmp uge float %arg, 0.0
724 define i1 @assume_oge_neg1__ult_0(float %arg) {
725 ; CHECK-LABEL: define i1 @assume_oge_neg1__ult_0(
726 ; CHECK-SAME: float [[ARG:%.*]]) {
727 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
728 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
729 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
730 ; CHECK-NEXT: ret i1 [[CMP]]
732 %oge.neg1 = fcmp oge float %arg, -1.0
733 call void @llvm.assume(i1 %oge.neg1)
734 %cmp = fcmp ult float %arg, 0.0
738 define i1 @assume_oge_neg1__ule_0(float %arg) {
739 ; CHECK-LABEL: define i1 @assume_oge_neg1__ule_0(
740 ; CHECK-SAME: float [[ARG:%.*]]) {
741 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
742 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
743 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
744 ; CHECK-NEXT: ret i1 [[CMP]]
746 %oge.neg1 = fcmp oge float %arg, -1.0
747 call void @llvm.assume(i1 %oge.neg1)
748 %cmp = fcmp ule float %arg, 0.0
752 define i1 @assume_oge_neg1__une_0(float %arg) {
753 ; CHECK-LABEL: define i1 @assume_oge_neg1__une_0(
754 ; CHECK-SAME: float [[ARG:%.*]]) {
755 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
756 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
757 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
758 ; CHECK-NEXT: ret i1 [[CMP]]
760 %oge.neg1 = fcmp oge float %arg, -1.0
761 call void @llvm.assume(i1 %oge.neg1)
762 %cmp = fcmp une float %arg, 0.0
766 define i1 @assume_oge_neg1__uno_0(float %arg) {
767 ; CHECK-LABEL: define i1 @assume_oge_neg1__uno_0(
768 ; CHECK-SAME: float [[ARG:%.*]]) {
769 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
770 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
771 ; CHECK-NEXT: ret i1 false
773 %oge.neg1 = fcmp oge float %arg, -1.0
774 call void @llvm.assume(i1 %oge.neg1)
775 %cmp = fcmp uno float %arg, 0.0
779 ; --------------------------------------------------------------------
780 ; Test assume x u>= -1.0 with compares to 0
781 ; --------------------------------------------------------------------
783 define i1 @assume_uge_neg1__oeq_0(float %arg) {
784 ; CHECK-LABEL: define i1 @assume_uge_neg1__oeq_0(
785 ; CHECK-SAME: float [[ARG:%.*]]) {
786 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
787 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
788 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
789 ; CHECK-NEXT: ret i1 [[CMP]]
791 %uge.neg1 = fcmp uge float %arg, -1.0
792 call void @llvm.assume(i1 %uge.neg1)
793 %cmp = fcmp oeq float %arg, 0.0
797 define i1 @assume_uge_neg1__ogt_0(float %arg) {
798 ; CHECK-LABEL: define i1 @assume_uge_neg1__ogt_0(
799 ; CHECK-SAME: float [[ARG:%.*]]) {
800 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
801 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
802 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
803 ; CHECK-NEXT: ret i1 [[CMP]]
805 %uge.neg1 = fcmp uge float %arg, -1.0
806 call void @llvm.assume(i1 %uge.neg1)
807 %cmp = fcmp ogt float %arg, 0.0
811 define i1 @assume_uge_neg1__oge_0(float %arg) {
812 ; CHECK-LABEL: define i1 @assume_uge_neg1__oge_0(
813 ; CHECK-SAME: float [[ARG:%.*]]) {
814 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
815 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
816 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
817 ; CHECK-NEXT: ret i1 [[CMP]]
819 %uge.neg1 = fcmp uge float %arg, -1.0
820 call void @llvm.assume(i1 %uge.neg1)
821 %cmp = fcmp oge float %arg, 0.0
825 define i1 @assume_uge_neg1__olt_0(float %arg) {
826 ; CHECK-LABEL: define i1 @assume_uge_neg1__olt_0(
827 ; CHECK-SAME: float [[ARG:%.*]]) {
828 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
829 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
830 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
831 ; CHECK-NEXT: ret i1 [[CMP]]
833 %uge.neg1 = fcmp uge float %arg, -1.0
834 call void @llvm.assume(i1 %uge.neg1)
835 %cmp = fcmp olt float %arg, 0.0
839 define i1 @assume_uge_neg1__ole_0(float %arg) {
840 ; CHECK-LABEL: define i1 @assume_uge_neg1__ole_0(
841 ; CHECK-SAME: float [[ARG:%.*]]) {
842 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
843 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
844 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
845 ; CHECK-NEXT: ret i1 [[CMP]]
847 %uge.neg1 = fcmp uge float %arg, -1.0
848 call void @llvm.assume(i1 %uge.neg1)
849 %cmp = fcmp ole float %arg, 0.0
853 define i1 @assume_uge_neg1__one_0(float %arg) {
854 ; CHECK-LABEL: define i1 @assume_uge_neg1__one_0(
855 ; CHECK-SAME: float [[ARG:%.*]]) {
856 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
857 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
858 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
859 ; CHECK-NEXT: ret i1 [[CMP]]
861 %uge.neg1 = fcmp uge float %arg, -1.0
862 call void @llvm.assume(i1 %uge.neg1)
863 %cmp = fcmp one float %arg, 0.0
867 define i1 @assume_uge_neg1__ord_0(float %arg) {
868 ; CHECK-LABEL: define i1 @assume_uge_neg1__ord_0(
869 ; CHECK-SAME: float [[ARG:%.*]]) {
870 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
871 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
872 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
873 ; CHECK-NEXT: ret i1 [[CMP]]
875 %uge.neg1 = fcmp uge float %arg, -1.0
876 call void @llvm.assume(i1 %uge.neg1)
877 %cmp = fcmp ord float %arg, 0.0
881 define i1 @assume_uge_neg1__ueq_0(float %arg) {
882 ; CHECK-LABEL: define i1 @assume_uge_neg1__ueq_0(
883 ; CHECK-SAME: float [[ARG:%.*]]) {
884 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
885 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
886 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
887 ; CHECK-NEXT: ret i1 [[CMP]]
889 %uge.neg1 = fcmp uge float %arg, -1.0
890 call void @llvm.assume(i1 %uge.neg1)
891 %cmp = fcmp ueq float %arg, 0.0
895 define i1 @assume_uge_neg1__ugt_0(float %arg) {
896 ; CHECK-LABEL: define i1 @assume_uge_neg1__ugt_0(
897 ; CHECK-SAME: float [[ARG:%.*]]) {
898 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
899 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
900 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
901 ; CHECK-NEXT: ret i1 [[CMP]]
903 %uge.neg1 = fcmp uge float %arg, -1.0
904 call void @llvm.assume(i1 %uge.neg1)
905 %cmp = fcmp ugt float %arg, 0.0
909 define i1 @assume_uge_neg1__uge_0(float %arg) {
910 ; CHECK-LABEL: define i1 @assume_uge_neg1__uge_0(
911 ; CHECK-SAME: float [[ARG:%.*]]) {
912 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
913 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
914 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
915 ; CHECK-NEXT: ret i1 [[CMP]]
917 %uge.neg1 = fcmp uge float %arg, -1.0
918 call void @llvm.assume(i1 %uge.neg1)
919 %cmp = fcmp uge float %arg, 0.0
923 define i1 @assume_uge_neg1__ult_0(float %arg) {
924 ; CHECK-LABEL: define i1 @assume_uge_neg1__ult_0(
925 ; CHECK-SAME: float [[ARG:%.*]]) {
926 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
927 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
928 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
929 ; CHECK-NEXT: ret i1 [[CMP]]
931 %uge.neg1 = fcmp uge float %arg, -1.0
932 call void @llvm.assume(i1 %uge.neg1)
933 %cmp = fcmp ult float %arg, 0.0
937 define i1 @assume_uge_neg1__ule_0(float %arg) {
938 ; CHECK-LABEL: define i1 @assume_uge_neg1__ule_0(
939 ; CHECK-SAME: float [[ARG:%.*]]) {
940 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
941 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
942 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
943 ; CHECK-NEXT: ret i1 [[CMP]]
945 %uge.neg1 = fcmp uge float %arg, -1.0
946 call void @llvm.assume(i1 %uge.neg1)
947 %cmp = fcmp ule float %arg, 0.0
951 define i1 @assume_uge_neg1__une_0(float %arg) {
952 ; CHECK-LABEL: define i1 @assume_uge_neg1__une_0(
953 ; CHECK-SAME: float [[ARG:%.*]]) {
954 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
955 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
956 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
957 ; CHECK-NEXT: ret i1 [[CMP]]
959 %uge.neg1 = fcmp uge float %arg, -1.0
960 call void @llvm.assume(i1 %uge.neg1)
961 %cmp = fcmp une float %arg, 0.0
965 define i1 @assume_uge_neg1__uno_0(float %arg) {
966 ; CHECK-LABEL: define i1 @assume_uge_neg1__uno_0(
967 ; CHECK-SAME: float [[ARG:%.*]]) {
968 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
969 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
970 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
971 ; CHECK-NEXT: ret i1 [[CMP]]
973 %uge.neg1 = fcmp uge float %arg, -1.0
974 call void @llvm.assume(i1 %uge.neg1)
975 %cmp = fcmp uno float %arg, 0.0
979 ; --------------------------------------------------------------------
980 ; Test assume x u> -1.0 with compares to 0
981 ; --------------------------------------------------------------------
983 define i1 @assume_ugt_neg1__oeq_0(float %arg) {
984 ; CHECK-LABEL: define i1 @assume_ugt_neg1__oeq_0(
985 ; CHECK-SAME: float [[ARG:%.*]]) {
986 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
987 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
988 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
989 ; CHECK-NEXT: ret i1 [[CMP]]
991 %ugt.neg1 = fcmp ugt float %arg, -1.0
992 call void @llvm.assume(i1 %ugt.neg1)
993 %cmp = fcmp oeq float %arg, 0.0
997 define i1 @assume_ugt_neg1__ogt_0(float %arg) {
998 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ogt_0(
999 ; CHECK-SAME: float [[ARG:%.*]]) {
1000 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1001 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1002 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1003 ; CHECK-NEXT: ret i1 [[CMP]]
1005 %ugt.neg1 = fcmp ugt float %arg, -1.0
1006 call void @llvm.assume(i1 %ugt.neg1)
1007 %cmp = fcmp ogt float %arg, 0.0
1011 define i1 @assume_ugt_neg1__oge_0(float %arg) {
1012 ; CHECK-LABEL: define i1 @assume_ugt_neg1__oge_0(
1013 ; CHECK-SAME: float [[ARG:%.*]]) {
1014 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1015 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1016 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1017 ; CHECK-NEXT: ret i1 [[CMP]]
1019 %ugt.neg1 = fcmp ugt float %arg, -1.0
1020 call void @llvm.assume(i1 %ugt.neg1)
1021 %cmp = fcmp oge float %arg, 0.0
1025 define i1 @assume_ugt_neg1__olt_0(float %arg) {
1026 ; CHECK-LABEL: define i1 @assume_ugt_neg1__olt_0(
1027 ; CHECK-SAME: float [[ARG:%.*]]) {
1028 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1029 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1030 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1031 ; CHECK-NEXT: ret i1 [[CMP]]
1033 %ugt.neg1 = fcmp ugt float %arg, -1.0
1034 call void @llvm.assume(i1 %ugt.neg1)
1035 %cmp = fcmp olt float %arg, 0.0
1039 define i1 @assume_ugt_neg1__ole_0(float %arg) {
1040 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ole_0(
1041 ; CHECK-SAME: float [[ARG:%.*]]) {
1042 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1043 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1044 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1045 ; CHECK-NEXT: ret i1 [[CMP]]
1047 %ugt.neg1 = fcmp ugt float %arg, -1.0
1048 call void @llvm.assume(i1 %ugt.neg1)
1049 %cmp = fcmp ole float %arg, 0.0
1053 define i1 @assume_ugt_neg1__one_0(float %arg) {
1054 ; CHECK-LABEL: define i1 @assume_ugt_neg1__one_0(
1055 ; CHECK-SAME: float [[ARG:%.*]]) {
1056 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1057 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1058 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1059 ; CHECK-NEXT: ret i1 [[CMP]]
1061 %ugt.neg1 = fcmp ugt float %arg, -1.0
1062 call void @llvm.assume(i1 %ugt.neg1)
1063 %cmp = fcmp one float %arg, 0.0
1067 define i1 @assume_ugt_neg1__ord_0(float %arg) {
1068 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ord_0(
1069 ; CHECK-SAME: float [[ARG:%.*]]) {
1070 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1071 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1072 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1073 ; CHECK-NEXT: ret i1 [[CMP]]
1075 %ugt.neg1 = fcmp ugt float %arg, -1.0
1076 call void @llvm.assume(i1 %ugt.neg1)
1077 %cmp = fcmp ord float %arg, 0.0
1081 define i1 @assume_ugt_neg1__ueq_0(float %arg) {
1082 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ueq_0(
1083 ; CHECK-SAME: float [[ARG:%.*]]) {
1084 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1085 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1086 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1087 ; CHECK-NEXT: ret i1 [[CMP]]
1089 %ugt.neg1 = fcmp ugt float %arg, -1.0
1090 call void @llvm.assume(i1 %ugt.neg1)
1091 %cmp = fcmp ueq float %arg, 0.0
1095 define i1 @assume_ugt_neg1__ugt_0(float %arg) {
1096 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ugt_0(
1097 ; CHECK-SAME: float [[ARG:%.*]]) {
1098 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1099 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1100 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1101 ; CHECK-NEXT: ret i1 [[CMP]]
1103 %ugt.neg1 = fcmp ugt float %arg, -1.0
1104 call void @llvm.assume(i1 %ugt.neg1)
1105 %cmp = fcmp ugt float %arg, 0.0
1109 define i1 @assume_ugt_neg1__uge_0(float %arg) {
1110 ; CHECK-LABEL: define i1 @assume_ugt_neg1__uge_0(
1111 ; CHECK-SAME: float [[ARG:%.*]]) {
1112 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1113 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1114 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1115 ; CHECK-NEXT: ret i1 [[CMP]]
1117 %ugt.neg1 = fcmp ugt float %arg, -1.0
1118 call void @llvm.assume(i1 %ugt.neg1)
1119 %cmp = fcmp uge float %arg, 0.0
1123 define i1 @assume_ugt_neg1__ult_0(float %arg) {
1124 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ult_0(
1125 ; CHECK-SAME: float [[ARG:%.*]]) {
1126 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1127 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1128 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1129 ; CHECK-NEXT: ret i1 [[CMP]]
1131 %ugt.neg1 = fcmp ugt float %arg, -1.0
1132 call void @llvm.assume(i1 %ugt.neg1)
1133 %cmp = fcmp ult float %arg, 0.0
1137 define i1 @assume_ugt_neg1__ule_0(float %arg) {
1138 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ule_0(
1139 ; CHECK-SAME: float [[ARG:%.*]]) {
1140 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1141 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1142 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1143 ; CHECK-NEXT: ret i1 [[CMP]]
1145 %ugt.neg1 = fcmp ugt float %arg, -1.0
1146 call void @llvm.assume(i1 %ugt.neg1)
1147 %cmp = fcmp ule float %arg, 0.0
1151 define i1 @assume_ugt_neg1__une_0(float %arg) {
1152 ; CHECK-LABEL: define i1 @assume_ugt_neg1__une_0(
1153 ; CHECK-SAME: float [[ARG:%.*]]) {
1154 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1155 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1156 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1157 ; CHECK-NEXT: ret i1 [[CMP]]
1159 %ugt.neg1 = fcmp ugt float %arg, -1.0
1160 call void @llvm.assume(i1 %ugt.neg1)
1161 %cmp = fcmp une float %arg, 0.0
1165 define i1 @assume_ugt_neg1__uno_0(float %arg) {
1166 ; CHECK-LABEL: define i1 @assume_ugt_neg1__uno_0(
1167 ; CHECK-SAME: float [[ARG:%.*]]) {
1168 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1169 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1170 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1171 ; CHECK-NEXT: ret i1 [[CMP]]
1173 %ugt.neg1 = fcmp ugt float %arg, -1.0
1174 call void @llvm.assume(i1 %ugt.neg1)
1175 %cmp = fcmp uno float %arg, 0.0
1179 ; --------------------------------------------------------------------
1180 ; Test assume x u<= -1.0 with compares to 0
1181 ; --------------------------------------------------------------------
1183 define i1 @assume_ule_neg1__oeq_0(float %arg) {
1184 ; CHECK-LABEL: define i1 @assume_ule_neg1__oeq_0(
1185 ; CHECK-SAME: float [[ARG:%.*]]) {
1186 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1187 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1188 ; CHECK-NEXT: ret i1 false
1190 %ule.neg1 = fcmp ule float %arg, -1.0
1191 call void @llvm.assume(i1 %ule.neg1)
1192 %cmp = fcmp oeq float %arg, 0.0
1196 define i1 @assume_ule_neg1__ogt_0(float %arg) {
1197 ; CHECK-LABEL: define i1 @assume_ule_neg1__ogt_0(
1198 ; CHECK-SAME: float [[ARG:%.*]]) {
1199 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1200 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1201 ; CHECK-NEXT: ret i1 false
1203 %ule.neg1 = fcmp ule float %arg, -1.0
1204 call void @llvm.assume(i1 %ule.neg1)
1205 %cmp = fcmp ogt float %arg, 0.0
1209 define i1 @assume_ule_neg1__oge_0(float %arg) {
1210 ; CHECK-LABEL: define i1 @assume_ule_neg1__oge_0(
1211 ; CHECK-SAME: float [[ARG:%.*]]) {
1212 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1213 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1214 ; CHECK-NEXT: ret i1 false
1216 %ule.neg1 = fcmp ule float %arg, -1.0
1217 call void @llvm.assume(i1 %ule.neg1)
1218 %cmp = fcmp oge float %arg, 0.0
1222 define i1 @assume_ule_neg1__olt_0(float %arg) {
1223 ; CHECK-LABEL: define i1 @assume_ule_neg1__olt_0(
1224 ; CHECK-SAME: float [[ARG:%.*]]) {
1225 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1226 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1227 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1228 ; CHECK-NEXT: ret i1 [[CMP]]
1230 %ule.neg1 = fcmp ule float %arg, -1.0
1231 call void @llvm.assume(i1 %ule.neg1)
1232 %cmp = fcmp olt float %arg, 0.0
1236 define i1 @assume_ule_neg1__ole_0(float %arg) {
1237 ; CHECK-LABEL: define i1 @assume_ule_neg1__ole_0(
1238 ; CHECK-SAME: float [[ARG:%.*]]) {
1239 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1240 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1241 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1242 ; CHECK-NEXT: ret i1 [[CMP]]
1244 %ule.neg1 = fcmp ule float %arg, -1.0
1245 call void @llvm.assume(i1 %ule.neg1)
1246 %cmp = fcmp ole float %arg, 0.0
1250 define i1 @assume_ule_neg1__one_0(float %arg) {
1251 ; CHECK-LABEL: define i1 @assume_ule_neg1__one_0(
1252 ; CHECK-SAME: float [[ARG:%.*]]) {
1253 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1254 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1255 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1256 ; CHECK-NEXT: ret i1 [[CMP]]
1258 %ule.neg1 = fcmp ule float %arg, -1.0
1259 call void @llvm.assume(i1 %ule.neg1)
1260 %cmp = fcmp one float %arg, 0.0
1264 define i1 @assume_ule_neg1__ord_0(float %arg) {
1265 ; CHECK-LABEL: define i1 @assume_ule_neg1__ord_0(
1266 ; CHECK-SAME: float [[ARG:%.*]]) {
1267 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1268 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1269 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1270 ; CHECK-NEXT: ret i1 [[CMP]]
1272 %ule.neg1 = fcmp ule float %arg, -1.0
1273 call void @llvm.assume(i1 %ule.neg1)
1274 %cmp = fcmp ord float %arg, 0.0
1278 define i1 @assume_ule_neg1__ueq_0(float %arg) {
1279 ; CHECK-LABEL: define i1 @assume_ule_neg1__ueq_0(
1280 ; CHECK-SAME: float [[ARG:%.*]]) {
1281 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1282 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1283 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1284 ; CHECK-NEXT: ret i1 [[CMP]]
1286 %ule.neg1 = fcmp ule float %arg, -1.0
1287 call void @llvm.assume(i1 %ule.neg1)
1288 %cmp = fcmp ueq float %arg, 0.0
1292 define i1 @assume_ule_neg1__ugt_0(float %arg) {
1293 ; CHECK-LABEL: define i1 @assume_ule_neg1__ugt_0(
1294 ; CHECK-SAME: float [[ARG:%.*]]) {
1295 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1296 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1297 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1298 ; CHECK-NEXT: ret i1 [[CMP]]
1300 %ule.neg1 = fcmp ule float %arg, -1.0
1301 call void @llvm.assume(i1 %ule.neg1)
1302 %cmp = fcmp ugt float %arg, 0.0
1306 define i1 @assume_ule_neg1__uge_0(float %arg) {
1307 ; CHECK-LABEL: define i1 @assume_ule_neg1__uge_0(
1308 ; CHECK-SAME: float [[ARG:%.*]]) {
1309 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1310 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1311 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1312 ; CHECK-NEXT: ret i1 [[CMP]]
1314 %ule.neg1 = fcmp ule float %arg, -1.0
1315 call void @llvm.assume(i1 %ule.neg1)
1316 %cmp = fcmp uge float %arg, 0.0
1320 define i1 @assume_ule_neg1__ult_0(float %arg) {
1321 ; CHECK-LABEL: define i1 @assume_ule_neg1__ult_0(
1322 ; CHECK-SAME: float [[ARG:%.*]]) {
1323 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1324 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1325 ; CHECK-NEXT: ret i1 true
1327 %ule.neg1 = fcmp ule float %arg, -1.0
1328 call void @llvm.assume(i1 %ule.neg1)
1329 %cmp = fcmp ult float %arg, 0.0
1333 define i1 @assume_ule_neg1__ule_0(float %arg) {
1334 ; CHECK-LABEL: define i1 @assume_ule_neg1__ule_0(
1335 ; CHECK-SAME: float [[ARG:%.*]]) {
1336 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1337 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1338 ; CHECK-NEXT: ret i1 true
1340 %ule.neg1 = fcmp ule float %arg, -1.0
1341 call void @llvm.assume(i1 %ule.neg1)
1342 %cmp = fcmp ule float %arg, 0.0
1346 define i1 @assume_ule_neg1__une_0(float %arg) {
1347 ; CHECK-LABEL: define i1 @assume_ule_neg1__une_0(
1348 ; CHECK-SAME: float [[ARG:%.*]]) {
1349 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1350 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1351 ; CHECK-NEXT: ret i1 true
1353 %ule.neg1 = fcmp ule float %arg, -1.0
1354 call void @llvm.assume(i1 %ule.neg1)
1355 %cmp = fcmp une float %arg, 0.0
1359 define i1 @assume_ule_neg1__uno_0(float %arg) {
1360 ; CHECK-LABEL: define i1 @assume_ule_neg1__uno_0(
1361 ; CHECK-SAME: float [[ARG:%.*]]) {
1362 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1363 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1364 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1365 ; CHECK-NEXT: ret i1 [[CMP]]
1367 %ule.neg1 = fcmp ule float %arg, -1.0
1368 call void @llvm.assume(i1 %ule.neg1)
1369 %cmp = fcmp uno float %arg, 0.0
1373 ; --------------------------------------------------------------------
1374 ; Test assume x u< -1.0 with compares to 0
1375 ; --------------------------------------------------------------------
1377 define i1 @assume_ult_neg1__oeq_0(float %arg) {
1378 ; CHECK-LABEL: define i1 @assume_ult_neg1__oeq_0(
1379 ; CHECK-SAME: float [[ARG:%.*]]) {
1380 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1381 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1382 ; CHECK-NEXT: ret i1 false
1384 %ult.neg1 = fcmp ult float %arg, -1.0
1385 call void @llvm.assume(i1 %ult.neg1)
1386 %cmp = fcmp oeq float %arg, 0.0
1390 define i1 @assume_ult_neg1__ogt_0(float %arg) {
1391 ; CHECK-LABEL: define i1 @assume_ult_neg1__ogt_0(
1392 ; CHECK-SAME: float [[ARG:%.*]]) {
1393 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1394 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1395 ; CHECK-NEXT: ret i1 false
1397 %ult.neg1 = fcmp ult float %arg, -1.0
1398 call void @llvm.assume(i1 %ult.neg1)
1399 %cmp = fcmp ogt float %arg, 0.0
1403 define i1 @assume_ult_neg1__oge_0(float %arg) {
1404 ; CHECK-LABEL: define i1 @assume_ult_neg1__oge_0(
1405 ; CHECK-SAME: float [[ARG:%.*]]) {
1406 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1407 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1408 ; CHECK-NEXT: ret i1 false
1410 %ult.neg1 = fcmp ult float %arg, -1.0
1411 call void @llvm.assume(i1 %ult.neg1)
1412 %cmp = fcmp oge float %arg, 0.0
1416 define i1 @assume_ult_neg1__olt_0(float %arg) {
1417 ; CHECK-LABEL: define i1 @assume_ult_neg1__olt_0(
1418 ; CHECK-SAME: float [[ARG:%.*]]) {
1419 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1420 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1421 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1422 ; CHECK-NEXT: ret i1 [[CMP]]
1424 %ult.neg1 = fcmp ult float %arg, -1.0
1425 call void @llvm.assume(i1 %ult.neg1)
1426 %cmp = fcmp olt float %arg, 0.0
1430 define i1 @assume_ult_neg1__ole_0(float %arg) {
1431 ; CHECK-LABEL: define i1 @assume_ult_neg1__ole_0(
1432 ; CHECK-SAME: float [[ARG:%.*]]) {
1433 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1434 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1435 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1436 ; CHECK-NEXT: ret i1 [[CMP]]
1438 %ult.neg1 = fcmp ult float %arg, -1.0
1439 call void @llvm.assume(i1 %ult.neg1)
1440 %cmp = fcmp ole float %arg, 0.0
1444 define i1 @assume_ult_neg1__one_0(float %arg) {
1445 ; CHECK-LABEL: define i1 @assume_ult_neg1__one_0(
1446 ; CHECK-SAME: float [[ARG:%.*]]) {
1447 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1448 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1449 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1450 ; CHECK-NEXT: ret i1 [[CMP]]
1452 %ult.neg1 = fcmp ult float %arg, -1.0
1453 call void @llvm.assume(i1 %ult.neg1)
1454 %cmp = fcmp one float %arg, 0.0
1458 define i1 @assume_ult_neg1__ord_0(float %arg) {
1459 ; CHECK-LABEL: define i1 @assume_ult_neg1__ord_0(
1460 ; CHECK-SAME: float [[ARG:%.*]]) {
1461 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1462 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1463 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1464 ; CHECK-NEXT: ret i1 [[CMP]]
1466 %ult.neg1 = fcmp ult float %arg, -1.0
1467 call void @llvm.assume(i1 %ult.neg1)
1468 %cmp = fcmp ord float %arg, 0.0
1472 define i1 @assume_ult_neg1__ueq_0(float %arg) {
1473 ; CHECK-LABEL: define i1 @assume_ult_neg1__ueq_0(
1474 ; CHECK-SAME: float [[ARG:%.*]]) {
1475 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1476 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1477 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1478 ; CHECK-NEXT: ret i1 [[CMP]]
1480 %ult.neg1 = fcmp ult float %arg, -1.0
1481 call void @llvm.assume(i1 %ult.neg1)
1482 %cmp = fcmp ueq float %arg, 0.0
1486 define i1 @assume_ult_neg1__ugt_0(float %arg) {
1487 ; CHECK-LABEL: define i1 @assume_ult_neg1__ugt_0(
1488 ; CHECK-SAME: float [[ARG:%.*]]) {
1489 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1490 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1491 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1492 ; CHECK-NEXT: ret i1 [[CMP]]
1494 %ult.neg1 = fcmp ult float %arg, -1.0
1495 call void @llvm.assume(i1 %ult.neg1)
1496 %cmp = fcmp ugt float %arg, 0.0
1500 define i1 @assume_ult_neg1__uge_0(float %arg) {
1501 ; CHECK-LABEL: define i1 @assume_ult_neg1__uge_0(
1502 ; CHECK-SAME: float [[ARG:%.*]]) {
1503 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1504 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1505 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1506 ; CHECK-NEXT: ret i1 [[CMP]]
1508 %ult.neg1 = fcmp ult float %arg, -1.0
1509 call void @llvm.assume(i1 %ult.neg1)
1510 %cmp = fcmp uge float %arg, 0.0
1514 define i1 @assume_ult_neg1__ult_0(float %arg) {
1515 ; CHECK-LABEL: define i1 @assume_ult_neg1__ult_0(
1516 ; CHECK-SAME: float [[ARG:%.*]]) {
1517 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1518 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1519 ; CHECK-NEXT: ret i1 true
1521 %ult.neg1 = fcmp ult float %arg, -1.0
1522 call void @llvm.assume(i1 %ult.neg1)
1523 %cmp = fcmp ult float %arg, 0.0
1527 define i1 @assume_ult_neg1__ule_0(float %arg) {
1528 ; CHECK-LABEL: define i1 @assume_ult_neg1__ule_0(
1529 ; CHECK-SAME: float [[ARG:%.*]]) {
1530 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1531 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1532 ; CHECK-NEXT: ret i1 true
1534 %ult.neg1 = fcmp ult float %arg, -1.0
1535 call void @llvm.assume(i1 %ult.neg1)
1536 %cmp = fcmp ule float %arg, 0.0
1540 define i1 @assume_ult_neg1__une_0(float %arg) {
1541 ; CHECK-LABEL: define i1 @assume_ult_neg1__une_0(
1542 ; CHECK-SAME: float [[ARG:%.*]]) {
1543 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1544 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1545 ; CHECK-NEXT: ret i1 true
1547 %ult.neg1 = fcmp ult float %arg, -1.0
1548 call void @llvm.assume(i1 %ult.neg1)
1549 %cmp = fcmp une float %arg, 0.0
1553 define i1 @assume_ult_neg1__uno_0(float %arg) {
1554 ; CHECK-LABEL: define i1 @assume_ult_neg1__uno_0(
1555 ; CHECK-SAME: float [[ARG:%.*]]) {
1556 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1557 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1558 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1559 ; CHECK-NEXT: ret i1 [[CMP]]
1561 %ult.neg1 = fcmp ult float %arg, -1.0
1562 call void @llvm.assume(i1 %ult.neg1)
1563 %cmp = fcmp uno float %arg, 0.0
1567 ; --------------------------------------------------------------------
1568 ; Test assume x == 0 with compares to 0
1569 ; --------------------------------------------------------------------
1571 define i1 @assume_oeq_0__oeq_0(float %arg) {
1572 ; CHECK-LABEL: define i1 @assume_oeq_0__oeq_0(
1573 ; CHECK-SAME: float [[ARG:%.*]]) {
1574 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1575 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1576 ; CHECK-NEXT: ret i1 true
1578 %oeq.0 = fcmp oeq float %arg, 0.0
1579 call void @llvm.assume(i1 %oeq.0)
1580 %cmp = fcmp oeq float %arg, 0.0
1584 define i1 @assume_oeq_0__ueq_0(float %arg) {
1585 ; CHECK-LABEL: define i1 @assume_oeq_0__ueq_0(
1586 ; CHECK-SAME: float [[ARG:%.*]]) {
1587 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1588 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1589 ; CHECK-NEXT: ret i1 true
1591 %oeq.0 = fcmp oeq float %arg, 0.0
1592 call void @llvm.assume(i1 %oeq.0)
1593 %cmp = fcmp ueq float %arg, 0.0
1597 define i1 @assume_one_0__oeq_0(float %arg) {
1598 ; CHECK-LABEL: define i1 @assume_one_0__oeq_0(
1599 ; CHECK-SAME: float [[ARG:%.*]]) {
1600 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1601 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1602 ; CHECK-NEXT: ret i1 false
1604 %oeq.0 = fcmp one float %arg, 0.0
1605 call void @llvm.assume(i1 %oeq.0)
1606 %cmp = fcmp oeq float %arg, 0.0
1610 define i1 @assume_ueq_0__oeq_0(float %arg) {
1611 ; CHECK-LABEL: define i1 @assume_ueq_0__oeq_0(
1612 ; CHECK-SAME: float [[ARG:%.*]]) {
1613 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1614 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1615 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1616 ; CHECK-NEXT: ret i1 [[CMP]]
1618 %oeq.0 = fcmp ueq float %arg, 0.0
1619 call void @llvm.assume(i1 %oeq.0)
1620 %cmp = fcmp oeq float %arg, 0.0
1624 define i1 @assume_ueq_0__ueq_0(float %arg) {
1625 ; CHECK-LABEL: define i1 @assume_ueq_0__ueq_0(
1626 ; CHECK-SAME: float [[ARG:%.*]]) {
1627 ; CHECK-NEXT: [[UEQ_0:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1628 ; CHECK-NEXT: call void @llvm.assume(i1 [[UEQ_0]])
1629 ; CHECK-NEXT: ret i1 true
1631 %ueq.0 = fcmp ueq float %arg, 0.0
1632 call void @llvm.assume(i1 %ueq.0)
1633 %cmp = fcmp ueq float %arg, 0.0
1637 define i1 @assume_one_0__ueq_0(float %arg) {
1638 ; CHECK-LABEL: define i1 @assume_one_0__ueq_0(
1639 ; CHECK-SAME: float [[ARG:%.*]]) {
1640 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1641 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1642 ; CHECK-NEXT: ret i1 false
1644 %one.0 = fcmp one float %arg, 0.0
1645 call void @llvm.assume(i1 %one.0)
1646 %cmp = fcmp ueq float %arg, 0.0
1650 define i1 @assume_one_0__one_0(float %arg) {
1651 ; CHECK-LABEL: define i1 @assume_one_0__one_0(
1652 ; CHECK-SAME: float [[ARG:%.*]]) {
1653 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1654 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1655 ; CHECK-NEXT: ret i1 true
1657 %one.0 = fcmp one float %arg, 0.0
1658 call void @llvm.assume(i1 %one.0)
1659 %cmp = fcmp one float %arg, 0.0
1663 define i1 @assume_une_0__oeq_0(float %arg) {
1664 ; CHECK-LABEL: define i1 @assume_une_0__oeq_0(
1665 ; CHECK-SAME: float [[ARG:%.*]]) {
1666 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1667 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1668 ; CHECK-NEXT: ret i1 false
1670 %one.0 = fcmp une float %arg, 0.0
1671 call void @llvm.assume(i1 %one.0)
1672 %cmp = fcmp oeq float %arg, 0.0
1676 define i1 @assume_une_0__one_0(float %arg) {
1677 ; CHECK-LABEL: define i1 @assume_une_0__one_0(
1678 ; CHECK-SAME: float [[ARG:%.*]]) {
1679 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1680 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1681 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1682 ; CHECK-NEXT: ret i1 [[CMP]]
1684 %one.0 = fcmp une float %arg, 0.0
1685 call void @llvm.assume(i1 %one.0)
1686 %cmp = fcmp one float %arg, 0.0
1690 ; --------------------------------------------------------------------
1691 ; Test assume x < 1.0 with compares to 0
1692 ; --------------------------------------------------------------------
1694 define i1 @assume_olt_pos1__oeq_0(float %arg) {
1695 ; CHECK-LABEL: define i1 @assume_olt_pos1__oeq_0(
1696 ; CHECK-SAME: float [[ARG:%.*]]) {
1697 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1698 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1699 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1700 ; CHECK-NEXT: ret i1 [[CMP]]
1702 %olt.pos1 = fcmp olt float %arg, 1.0
1703 call void @llvm.assume(i1 %olt.pos1)
1704 %cmp = fcmp oeq float %arg, 0.0
1708 define i1 @assume_olt_pos1__ogt_0(float %arg) {
1709 ; CHECK-LABEL: define i1 @assume_olt_pos1__ogt_0(
1710 ; CHECK-SAME: float [[ARG:%.*]]) {
1711 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1712 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1713 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1714 ; CHECK-NEXT: ret i1 [[CMP]]
1716 %olt.pos1 = fcmp olt float %arg, 1.0
1717 call void @llvm.assume(i1 %olt.pos1)
1718 %cmp = fcmp ogt float %arg, 0.0
1722 define i1 @assume_olt_pos1__oge_0(float %arg) {
1723 ; CHECK-LABEL: define i1 @assume_olt_pos1__oge_0(
1724 ; CHECK-SAME: float [[ARG:%.*]]) {
1725 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1726 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1727 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1728 ; CHECK-NEXT: ret i1 [[CMP]]
1730 %olt.pos1 = fcmp olt float %arg, 1.0
1731 call void @llvm.assume(i1 %olt.pos1)
1732 %cmp = fcmp oge float %arg, 0.0
1736 define i1 @assume_olt_pos1__olt_0(float %arg) {
1737 ; CHECK-LABEL: define i1 @assume_olt_pos1__olt_0(
1738 ; CHECK-SAME: float [[ARG:%.*]]) {
1739 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1740 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1741 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1742 ; CHECK-NEXT: ret i1 [[CMP]]
1744 %olt.pos1 = fcmp olt float %arg, 1.0
1745 call void @llvm.assume(i1 %olt.pos1)
1746 %cmp = fcmp olt float %arg, 0.0
1750 define i1 @assume_olt_pos1__ole_0(float %arg) {
1751 ; CHECK-LABEL: define i1 @assume_olt_pos1__ole_0(
1752 ; CHECK-SAME: float [[ARG:%.*]]) {
1753 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1754 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1755 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1756 ; CHECK-NEXT: ret i1 [[CMP]]
1758 %olt.pos1 = fcmp olt float %arg, 1.0
1759 call void @llvm.assume(i1 %olt.pos1)
1760 %cmp = fcmp ole float %arg, 0.0
1764 define i1 @assume_olt_pos1__one_0(float %arg) {
1765 ; CHECK-LABEL: define i1 @assume_olt_pos1__one_0(
1766 ; CHECK-SAME: float [[ARG:%.*]]) {
1767 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1768 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1769 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1770 ; CHECK-NEXT: ret i1 [[CMP]]
1772 %olt.pos1 = fcmp olt float %arg, 1.0
1773 call void @llvm.assume(i1 %olt.pos1)
1774 %cmp = fcmp one float %arg, 0.0
1778 define i1 @assume_olt_pos1__ord_0(float %arg) {
1779 ; CHECK-LABEL: define i1 @assume_olt_pos1__ord_0(
1780 ; CHECK-SAME: float [[ARG:%.*]]) {
1781 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1782 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1783 ; CHECK-NEXT: ret i1 true
1785 %olt.pos1 = fcmp olt float %arg, 1.0
1786 call void @llvm.assume(i1 %olt.pos1)
1787 %cmp = fcmp ord float %arg, 0.0
1791 define i1 @assume_olt_pos1__ueq_0(float %arg) {
1792 ; CHECK-LABEL: define i1 @assume_olt_pos1__ueq_0(
1793 ; CHECK-SAME: float [[ARG:%.*]]) {
1794 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1795 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1796 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1797 ; CHECK-NEXT: ret i1 [[CMP]]
1799 %olt.pos1 = fcmp olt float %arg, 1.0
1800 call void @llvm.assume(i1 %olt.pos1)
1801 %cmp = fcmp ueq float %arg, 0.0
1805 define i1 @assume_olt_pos1__ugt_0(float %arg) {
1806 ; CHECK-LABEL: define i1 @assume_olt_pos1__ugt_0(
1807 ; CHECK-SAME: float [[ARG:%.*]]) {
1808 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1809 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1810 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1811 ; CHECK-NEXT: ret i1 [[CMP]]
1813 %olt.pos1 = fcmp olt float %arg, 1.0
1814 call void @llvm.assume(i1 %olt.pos1)
1815 %cmp = fcmp ugt float %arg, 0.0
1819 define i1 @assume_olt_pos1__uge_0(float %arg) {
1820 ; CHECK-LABEL: define i1 @assume_olt_pos1__uge_0(
1821 ; CHECK-SAME: float [[ARG:%.*]]) {
1822 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1823 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1824 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1825 ; CHECK-NEXT: ret i1 [[CMP]]
1827 %olt.pos1 = fcmp olt float %arg, 1.0
1828 call void @llvm.assume(i1 %olt.pos1)
1829 %cmp = fcmp uge float %arg, 0.0
1833 define i1 @assume_olt_pos1__ult_0(float %arg) {
1834 ; CHECK-LABEL: define i1 @assume_olt_pos1__ult_0(
1835 ; CHECK-SAME: float [[ARG:%.*]]) {
1836 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1837 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1838 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1839 ; CHECK-NEXT: ret i1 [[CMP]]
1841 %olt.pos1 = fcmp olt float %arg, 1.0
1842 call void @llvm.assume(i1 %olt.pos1)
1843 %cmp = fcmp ult float %arg, 0.0
1847 define i1 @assume_olt_pos1__ule_0(float %arg) {
1848 ; CHECK-LABEL: define i1 @assume_olt_pos1__ule_0(
1849 ; CHECK-SAME: float [[ARG:%.*]]) {
1850 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1851 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1852 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1853 ; CHECK-NEXT: ret i1 [[CMP]]
1855 %olt.pos1 = fcmp olt float %arg, 1.0
1856 call void @llvm.assume(i1 %olt.pos1)
1857 %cmp = fcmp ule float %arg, 0.0
1861 define i1 @assume_olt_pos1__une_0(float %arg) {
1862 ; CHECK-LABEL: define i1 @assume_olt_pos1__une_0(
1863 ; CHECK-SAME: float [[ARG:%.*]]) {
1864 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1865 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1866 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1867 ; CHECK-NEXT: ret i1 [[CMP]]
1869 %olt.pos1 = fcmp olt float %arg, 1.0
1870 call void @llvm.assume(i1 %olt.pos1)
1871 %cmp = fcmp une float %arg, 0.0
1875 define i1 @assume_olt_pos1__uno_0(float %arg) {
1876 ; CHECK-LABEL: define i1 @assume_olt_pos1__uno_0(
1877 ; CHECK-SAME: float [[ARG:%.*]]) {
1878 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1879 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1880 ; CHECK-NEXT: ret i1 false
1882 %olt.pos1 = fcmp olt float %arg, 1.0
1883 call void @llvm.assume(i1 %olt.pos1)
1884 %cmp = fcmp uno float %arg, 0.0
1888 ; --------------------------------------------------------------------
1889 ; Test assume x <= 1.0 with compares to 0
1890 ; --------------------------------------------------------------------
1892 define i1 @assume_ole_pos1__oeq_0(float %arg) {
1893 ; CHECK-LABEL: define i1 @assume_ole_pos1__oeq_0(
1894 ; CHECK-SAME: float [[ARG:%.*]]) {
1895 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1896 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1897 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1898 ; CHECK-NEXT: ret i1 [[CMP]]
1900 %ole.pos1 = fcmp ole float %arg, 1.0
1901 call void @llvm.assume(i1 %ole.pos1)
1902 %cmp = fcmp oeq float %arg, 0.0
1906 define i1 @assume_ole_pos1__ogt_0(float %arg) {
1907 ; CHECK-LABEL: define i1 @assume_ole_pos1__ogt_0(
1908 ; CHECK-SAME: float [[ARG:%.*]]) {
1909 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1910 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1911 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1912 ; CHECK-NEXT: ret i1 [[CMP]]
1914 %ole.pos1 = fcmp ole float %arg, 1.0
1915 call void @llvm.assume(i1 %ole.pos1)
1916 %cmp = fcmp ogt float %arg, 0.0
1920 define i1 @assume_ole_pos1__oge_0(float %arg) {
1921 ; CHECK-LABEL: define i1 @assume_ole_pos1__oge_0(
1922 ; CHECK-SAME: float [[ARG:%.*]]) {
1923 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1924 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1925 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1926 ; CHECK-NEXT: ret i1 [[CMP]]
1928 %ole.pos1 = fcmp ole float %arg, 1.0
1929 call void @llvm.assume(i1 %ole.pos1)
1930 %cmp = fcmp oge float %arg, 0.0
1934 define i1 @assume_ole_pos1__olt_0(float %arg) {
1935 ; CHECK-LABEL: define i1 @assume_ole_pos1__olt_0(
1936 ; CHECK-SAME: float [[ARG:%.*]]) {
1937 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1938 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1939 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1940 ; CHECK-NEXT: ret i1 [[CMP]]
1942 %ole.pos1 = fcmp ole float %arg, 1.0
1943 call void @llvm.assume(i1 %ole.pos1)
1944 %cmp = fcmp olt float %arg, 0.0
1948 define i1 @assume_ole_pos1__ole_0(float %arg) {
1949 ; CHECK-LABEL: define i1 @assume_ole_pos1__ole_0(
1950 ; CHECK-SAME: float [[ARG:%.*]]) {
1951 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1952 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1953 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1954 ; CHECK-NEXT: ret i1 [[CMP]]
1956 %ole.pos1 = fcmp ole float %arg, 1.0
1957 call void @llvm.assume(i1 %ole.pos1)
1958 %cmp = fcmp ole float %arg, 0.0
1962 define i1 @assume_ole_pos1__one_0(float %arg) {
1963 ; CHECK-LABEL: define i1 @assume_ole_pos1__one_0(
1964 ; CHECK-SAME: float [[ARG:%.*]]) {
1965 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1966 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1967 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1968 ; CHECK-NEXT: ret i1 [[CMP]]
1970 %ole.pos1 = fcmp ole float %arg, 1.0
1971 call void @llvm.assume(i1 %ole.pos1)
1972 %cmp = fcmp one float %arg, 0.0
1976 define i1 @assume_ole_pos1__ord_0(float %arg) {
1977 ; CHECK-LABEL: define i1 @assume_ole_pos1__ord_0(
1978 ; CHECK-SAME: float [[ARG:%.*]]) {
1979 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1980 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1981 ; CHECK-NEXT: ret i1 true
1983 %ole.pos1 = fcmp ole float %arg, 1.0
1984 call void @llvm.assume(i1 %ole.pos1)
1985 %cmp = fcmp ord float %arg, 0.0
1989 define i1 @assume_ole_pos1__ueq_0(float %arg) {
1990 ; CHECK-LABEL: define i1 @assume_ole_pos1__ueq_0(
1991 ; CHECK-SAME: float [[ARG:%.*]]) {
1992 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1993 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1994 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1995 ; CHECK-NEXT: ret i1 [[CMP]]
1997 %ole.pos1 = fcmp ole float %arg, 1.0
1998 call void @llvm.assume(i1 %ole.pos1)
1999 %cmp = fcmp ueq float %arg, 0.0
2003 define i1 @assume_ole_pos1__ugt_0(float %arg) {
2004 ; CHECK-LABEL: define i1 @assume_ole_pos1__ugt_0(
2005 ; CHECK-SAME: float [[ARG:%.*]]) {
2006 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2007 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2008 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2009 ; CHECK-NEXT: ret i1 [[CMP]]
2011 %ole.pos1 = fcmp ole float %arg, 1.0
2012 call void @llvm.assume(i1 %ole.pos1)
2013 %cmp = fcmp ugt float %arg, 0.0
2017 define i1 @assume_ole_pos1__uge_0(float %arg) {
2018 ; CHECK-LABEL: define i1 @assume_ole_pos1__uge_0(
2019 ; CHECK-SAME: float [[ARG:%.*]]) {
2020 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2021 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2022 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2023 ; CHECK-NEXT: ret i1 [[CMP]]
2025 %ole.pos1 = fcmp ole float %arg, 1.0
2026 call void @llvm.assume(i1 %ole.pos1)
2027 %cmp = fcmp uge float %arg, 0.0
2031 define i1 @assume_ole_pos1__ult_0(float %arg) {
2032 ; CHECK-LABEL: define i1 @assume_ole_pos1__ult_0(
2033 ; CHECK-SAME: float [[ARG:%.*]]) {
2034 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2035 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2036 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2037 ; CHECK-NEXT: ret i1 [[CMP]]
2039 %ole.pos1 = fcmp ole float %arg, 1.0
2040 call void @llvm.assume(i1 %ole.pos1)
2041 %cmp = fcmp ult float %arg, 0.0
2045 define i1 @assume_ole_pos1__ule_0(float %arg) {
2046 ; CHECK-LABEL: define i1 @assume_ole_pos1__ule_0(
2047 ; CHECK-SAME: float [[ARG:%.*]]) {
2048 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2049 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2050 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2051 ; CHECK-NEXT: ret i1 [[CMP]]
2053 %ole.pos1 = fcmp ole float %arg, 1.0
2054 call void @llvm.assume(i1 %ole.pos1)
2055 %cmp = fcmp ule float %arg, 0.0
2059 define i1 @assume_ole_pos1__une_0(float %arg) {
2060 ; CHECK-LABEL: define i1 @assume_ole_pos1__une_0(
2061 ; CHECK-SAME: float [[ARG:%.*]]) {
2062 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2063 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2064 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2065 ; CHECK-NEXT: ret i1 [[CMP]]
2067 %ole.pos1 = fcmp ole float %arg, 1.0
2068 call void @llvm.assume(i1 %ole.pos1)
2069 %cmp = fcmp une float %arg, 0.0
2073 define i1 @assume_ole_pos1__uno_0(float %arg) {
2074 ; CHECK-LABEL: define i1 @assume_ole_pos1__uno_0(
2075 ; CHECK-SAME: float [[ARG:%.*]]) {
2076 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2077 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2078 ; CHECK-NEXT: ret i1 false
2080 %ole.pos1 = fcmp ole float %arg, 1.0
2081 call void @llvm.assume(i1 %ole.pos1)
2082 %cmp = fcmp uno float %arg, 0.0
2086 ; --------------------------------------------------------------------
2087 ; Test assume x > 1.0 with compares to 0
2088 ; --------------------------------------------------------------------
2090 define i1 @assume_ogt_pos1__oeq_0(float %arg) {
2091 ; CHECK-LABEL: define i1 @assume_ogt_pos1__oeq_0(
2092 ; CHECK-SAME: float [[ARG:%.*]]) {
2093 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2094 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2095 ; CHECK-NEXT: ret i1 false
2097 %ogt.pos1 = fcmp ogt float %arg, 1.0
2098 call void @llvm.assume(i1 %ogt.pos1)
2099 %cmp = fcmp oeq float %arg, 0.0
2103 define i1 @assume_ogt_pos1__ogt_0(float %arg) {
2104 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ogt_0(
2105 ; CHECK-SAME: float [[ARG:%.*]]) {
2106 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2107 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2108 ; CHECK-NEXT: ret i1 true
2110 %ogt.pos1 = fcmp ogt float %arg, 1.0
2111 call void @llvm.assume(i1 %ogt.pos1)
2112 %cmp = fcmp ogt float %arg, 0.0
2116 define i1 @assume_ogt_pos1__oge_0(float %arg) {
2117 ; CHECK-LABEL: define i1 @assume_ogt_pos1__oge_0(
2118 ; CHECK-SAME: float [[ARG:%.*]]) {
2119 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2120 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2121 ; CHECK-NEXT: ret i1 true
2123 %ogt.pos1 = fcmp ogt float %arg, 1.0
2124 call void @llvm.assume(i1 %ogt.pos1)
2125 %cmp = fcmp oge float %arg, 0.0
2129 define i1 @assume_ogt_pos1__olt_0(float %arg) {
2130 ; CHECK-LABEL: define i1 @assume_ogt_pos1__olt_0(
2131 ; CHECK-SAME: float [[ARG:%.*]]) {
2132 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2133 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2134 ; CHECK-NEXT: ret i1 false
2136 %ogt.pos1 = fcmp ogt float %arg, 1.0
2137 call void @llvm.assume(i1 %ogt.pos1)
2138 %cmp = fcmp olt float %arg, 0.0
2142 define i1 @assume_ogt_pos1__ole_0(float %arg) {
2143 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ole_0(
2144 ; CHECK-SAME: float [[ARG:%.*]]) {
2145 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2146 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2147 ; CHECK-NEXT: ret i1 false
2149 %ogt.pos1 = fcmp ogt float %arg, 1.0
2150 call void @llvm.assume(i1 %ogt.pos1)
2151 %cmp = fcmp ole float %arg, 0.0
2155 define i1 @assume_ogt_pos1__one_0(float %arg) {
2156 ; CHECK-LABEL: define i1 @assume_ogt_pos1__one_0(
2157 ; CHECK-SAME: float [[ARG:%.*]]) {
2158 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2159 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2160 ; CHECK-NEXT: ret i1 true
2162 %ogt.pos1 = fcmp ogt float %arg, 1.0
2163 call void @llvm.assume(i1 %ogt.pos1)
2164 %cmp = fcmp one float %arg, 0.0
2168 define i1 @assume_ogt_pos1__ord_0(float %arg) {
2169 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ord_0(
2170 ; CHECK-SAME: float [[ARG:%.*]]) {
2171 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2172 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2173 ; CHECK-NEXT: ret i1 true
2175 %ogt.pos1 = fcmp ogt float %arg, 1.0
2176 call void @llvm.assume(i1 %ogt.pos1)
2177 %cmp = fcmp ord float %arg, 0.0
2181 define i1 @assume_ogt_pos1__ueq_0(float %arg) {
2182 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ueq_0(
2183 ; CHECK-SAME: float [[ARG:%.*]]) {
2184 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2185 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2186 ; CHECK-NEXT: ret i1 false
2188 %ogt.pos1 = fcmp ogt float %arg, 1.0
2189 call void @llvm.assume(i1 %ogt.pos1)
2190 %cmp = fcmp ueq float %arg, 0.0
2194 define i1 @assume_ogt_pos1__ugt_0(float %arg) {
2195 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ugt_0(
2196 ; CHECK-SAME: float [[ARG:%.*]]) {
2197 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2198 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2199 ; CHECK-NEXT: ret i1 true
2201 %ogt.pos1 = fcmp ogt float %arg, 1.0
2202 call void @llvm.assume(i1 %ogt.pos1)
2203 %cmp = fcmp ugt float %arg, 0.0
2207 define i1 @assume_ogt_pos1__uge_0(float %arg) {
2208 ; CHECK-LABEL: define i1 @assume_ogt_pos1__uge_0(
2209 ; CHECK-SAME: float [[ARG:%.*]]) {
2210 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2211 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2212 ; CHECK-NEXT: ret i1 true
2214 %ogt.pos1 = fcmp ogt float %arg, 1.0
2215 call void @llvm.assume(i1 %ogt.pos1)
2216 %cmp = fcmp uge float %arg, 0.0
2220 define i1 @assume_ogt_pos1__ult_0(float %arg) {
2221 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ult_0(
2222 ; CHECK-SAME: float [[ARG:%.*]]) {
2223 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2224 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2225 ; CHECK-NEXT: ret i1 false
2227 %ogt.pos1 = fcmp ogt float %arg, 1.0
2228 call void @llvm.assume(i1 %ogt.pos1)
2229 %cmp = fcmp ult float %arg, 0.0
2233 define i1 @assume_ogt_pos1__ule_0(float %arg) {
2234 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ule_0(
2235 ; CHECK-SAME: float [[ARG:%.*]]) {
2236 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2237 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2238 ; CHECK-NEXT: ret i1 false
2240 %ogt.pos1 = fcmp ogt float %arg, 1.0
2241 call void @llvm.assume(i1 %ogt.pos1)
2242 %cmp = fcmp ule float %arg, 0.0
2246 define i1 @assume_ogt_pos1__une_0(float %arg) {
2247 ; CHECK-LABEL: define i1 @assume_ogt_pos1__une_0(
2248 ; CHECK-SAME: float [[ARG:%.*]]) {
2249 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2250 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2251 ; CHECK-NEXT: ret i1 true
2253 %ogt.pos1 = fcmp ogt float %arg, 1.0
2254 call void @llvm.assume(i1 %ogt.pos1)
2255 %cmp = fcmp une float %arg, 0.0
2259 define i1 @assume_ogt_pos1__uno_0(float %arg) {
2260 ; CHECK-LABEL: define i1 @assume_ogt_pos1__uno_0(
2261 ; CHECK-SAME: float [[ARG:%.*]]) {
2262 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2263 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2264 ; CHECK-NEXT: ret i1 false
2266 %ogt.pos1 = fcmp ogt float %arg, 1.0
2267 call void @llvm.assume(i1 %ogt.pos1)
2268 %cmp = fcmp uno float %arg, 0.0
2272 ; --------------------------------------------------------------------
2273 ; Test assume x >= 1.0 with compares to 0
2274 ; --------------------------------------------------------------------
2276 define i1 @assume_oge_pos1__oeq_0(float %arg) {
2277 ; CHECK-LABEL: define i1 @assume_oge_pos1__oeq_0(
2278 ; CHECK-SAME: float [[ARG:%.*]]) {
2279 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2280 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2281 ; CHECK-NEXT: ret i1 false
2283 %oge.pos1 = fcmp oge float %arg, 1.0
2284 call void @llvm.assume(i1 %oge.pos1)
2285 %cmp = fcmp oeq float %arg, 0.0
2289 define i1 @assume_oge_pos1__ogt_0(float %arg) {
2290 ; CHECK-LABEL: define i1 @assume_oge_pos1__ogt_0(
2291 ; CHECK-SAME: float [[ARG:%.*]]) {
2292 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2293 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2294 ; CHECK-NEXT: ret i1 true
2296 %oge.pos1 = fcmp oge float %arg, 1.0
2297 call void @llvm.assume(i1 %oge.pos1)
2298 %cmp = fcmp ogt float %arg, 0.0
2302 define i1 @assume_oge_pos1__oge_0(float %arg) {
2303 ; CHECK-LABEL: define i1 @assume_oge_pos1__oge_0(
2304 ; CHECK-SAME: float [[ARG:%.*]]) {
2305 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2306 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2307 ; CHECK-NEXT: ret i1 true
2309 %oge.pos1 = fcmp oge float %arg, 1.0
2310 call void @llvm.assume(i1 %oge.pos1)
2311 %cmp = fcmp oge float %arg, 0.0
2315 define i1 @assume_oge_pos1__olt_0(float %arg) {
2316 ; CHECK-LABEL: define i1 @assume_oge_pos1__olt_0(
2317 ; CHECK-SAME: float [[ARG:%.*]]) {
2318 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2319 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2320 ; CHECK-NEXT: ret i1 false
2322 %oge.pos1 = fcmp oge float %arg, 1.0
2323 call void @llvm.assume(i1 %oge.pos1)
2324 %cmp = fcmp olt float %arg, 0.0
2328 define i1 @assume_oge_pos1__ole_0(float %arg) {
2329 ; CHECK-LABEL: define i1 @assume_oge_pos1__ole_0(
2330 ; CHECK-SAME: float [[ARG:%.*]]) {
2331 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2332 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2333 ; CHECK-NEXT: ret i1 false
2335 %oge.pos1 = fcmp oge float %arg, 1.0
2336 call void @llvm.assume(i1 %oge.pos1)
2337 %cmp = fcmp ole float %arg, 0.0
2341 define i1 @assume_oge_pos1__one_0(float %arg) {
2342 ; CHECK-LABEL: define i1 @assume_oge_pos1__one_0(
2343 ; CHECK-SAME: float [[ARG:%.*]]) {
2344 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2345 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2346 ; CHECK-NEXT: ret i1 true
2348 %oge.pos1 = fcmp oge float %arg, 1.0
2349 call void @llvm.assume(i1 %oge.pos1)
2350 %cmp = fcmp one float %arg, 0.0
2354 define i1 @assume_oge_pos1__ord_0(float %arg) {
2355 ; CHECK-LABEL: define i1 @assume_oge_pos1__ord_0(
2356 ; CHECK-SAME: float [[ARG:%.*]]) {
2357 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2358 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2359 ; CHECK-NEXT: ret i1 true
2361 %oge.pos1 = fcmp oge float %arg, 1.0
2362 call void @llvm.assume(i1 %oge.pos1)
2363 %cmp = fcmp ord float %arg, 0.0
2367 define i1 @assume_oge_pos1__ueq_0(float %arg) {
2368 ; CHECK-LABEL: define i1 @assume_oge_pos1__ueq_0(
2369 ; CHECK-SAME: float [[ARG:%.*]]) {
2370 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2371 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2372 ; CHECK-NEXT: ret i1 false
2374 %oge.pos1 = fcmp oge float %arg, 1.0
2375 call void @llvm.assume(i1 %oge.pos1)
2376 %cmp = fcmp ueq float %arg, 0.0
2380 define i1 @assume_oge_pos1__ugt_0(float %arg) {
2381 ; CHECK-LABEL: define i1 @assume_oge_pos1__ugt_0(
2382 ; CHECK-SAME: float [[ARG:%.*]]) {
2383 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2384 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2385 ; CHECK-NEXT: ret i1 true
2387 %oge.pos1 = fcmp oge float %arg, 1.0
2388 call void @llvm.assume(i1 %oge.pos1)
2389 %cmp = fcmp ugt float %arg, 0.0
2393 define i1 @assume_oge_pos1__uge_0(float %arg) {
2394 ; CHECK-LABEL: define i1 @assume_oge_pos1__uge_0(
2395 ; CHECK-SAME: float [[ARG:%.*]]) {
2396 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2397 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2398 ; CHECK-NEXT: ret i1 true
2400 %oge.pos1 = fcmp oge float %arg, 1.0
2401 call void @llvm.assume(i1 %oge.pos1)
2402 %cmp = fcmp uge float %arg, 0.0
2406 define i1 @assume_oge_pos1__ult_0(float %arg) {
2407 ; CHECK-LABEL: define i1 @assume_oge_pos1__ult_0(
2408 ; CHECK-SAME: float [[ARG:%.*]]) {
2409 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2410 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2411 ; CHECK-NEXT: ret i1 false
2413 %oge.pos1 = fcmp oge float %arg, 1.0
2414 call void @llvm.assume(i1 %oge.pos1)
2415 %cmp = fcmp ult float %arg, 0.0
2419 define i1 @assume_oge_pos1__ule_0(float %arg) {
2420 ; CHECK-LABEL: define i1 @assume_oge_pos1__ule_0(
2421 ; CHECK-SAME: float [[ARG:%.*]]) {
2422 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2423 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2424 ; CHECK-NEXT: ret i1 false
2426 %oge.pos1 = fcmp oge float %arg, 1.0
2427 call void @llvm.assume(i1 %oge.pos1)
2428 %cmp = fcmp ule float %arg, 0.0
2432 define i1 @assume_oge_pos1__une_0(float %arg) {
2433 ; CHECK-LABEL: define i1 @assume_oge_pos1__une_0(
2434 ; CHECK-SAME: float [[ARG:%.*]]) {
2435 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2436 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2437 ; CHECK-NEXT: ret i1 true
2439 %oge.pos1 = fcmp oge float %arg, 1.0
2440 call void @llvm.assume(i1 %oge.pos1)
2441 %cmp = fcmp une float %arg, 0.0
2445 define i1 @assume_oge_pos1__uno_0(float %arg) {
2446 ; CHECK-LABEL: define i1 @assume_oge_pos1__uno_0(
2447 ; CHECK-SAME: float [[ARG:%.*]]) {
2448 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2449 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2450 ; CHECK-NEXT: ret i1 false
2452 %oge.pos1 = fcmp oge float %arg, 1.0
2453 call void @llvm.assume(i1 %oge.pos1)
2454 %cmp = fcmp uno float %arg, 0.0
2458 ; --------------------------------------------------------------------
2459 ; Test assume x u> 1.0 with compares to 0
2460 ; --------------------------------------------------------------------
2462 define i1 @assume_ugt_pos1__oeq_0(float %arg) {
2463 ; CHECK-LABEL: define i1 @assume_ugt_pos1__oeq_0(
2464 ; CHECK-SAME: float [[ARG:%.*]]) {
2465 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2466 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2467 ; CHECK-NEXT: ret i1 false
2469 %ugt.pos1 = fcmp ugt float %arg, 1.0
2470 call void @llvm.assume(i1 %ugt.pos1)
2471 %cmp = fcmp oeq float %arg, 0.0
2475 define i1 @assume_ugt_pos1__ogt_0(float %arg) {
2476 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ogt_0(
2477 ; CHECK-SAME: float [[ARG:%.*]]) {
2478 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2479 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2480 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2481 ; CHECK-NEXT: ret i1 [[CMP]]
2483 %ugt.pos1 = fcmp ugt float %arg, 1.0
2484 call void @llvm.assume(i1 %ugt.pos1)
2485 %cmp = fcmp ogt float %arg, 0.0
2489 define i1 @assume_ugt_pos1__oge_0(float %arg) {
2490 ; CHECK-LABEL: define i1 @assume_ugt_pos1__oge_0(
2491 ; CHECK-SAME: float [[ARG:%.*]]) {
2492 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2493 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2494 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2495 ; CHECK-NEXT: ret i1 [[CMP]]
2497 %ugt.pos1 = fcmp ugt float %arg, 1.0
2498 call void @llvm.assume(i1 %ugt.pos1)
2499 %cmp = fcmp oge float %arg, 0.0
2503 define i1 @assume_ugt_pos1__olt_0(float %arg) {
2504 ; CHECK-LABEL: define i1 @assume_ugt_pos1__olt_0(
2505 ; CHECK-SAME: float [[ARG:%.*]]) {
2506 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2507 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2508 ; CHECK-NEXT: ret i1 false
2510 %ugt.pos1 = fcmp ugt float %arg, 1.0
2511 call void @llvm.assume(i1 %ugt.pos1)
2512 %cmp = fcmp olt float %arg, 0.0
2516 define i1 @assume_ugt_pos1__ole_0(float %arg) {
2517 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ole_0(
2518 ; CHECK-SAME: float [[ARG:%.*]]) {
2519 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2520 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2521 ; CHECK-NEXT: ret i1 false
2523 %ugt.pos1 = fcmp ugt float %arg, 1.0
2524 call void @llvm.assume(i1 %ugt.pos1)
2525 %cmp = fcmp ole float %arg, 0.0
2529 define i1 @assume_ugt_pos1__one_0(float %arg) {
2530 ; CHECK-LABEL: define i1 @assume_ugt_pos1__one_0(
2531 ; CHECK-SAME: float [[ARG:%.*]]) {
2532 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2533 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2534 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2535 ; CHECK-NEXT: ret i1 [[CMP]]
2537 %ugt.pos1 = fcmp ugt float %arg, 1.0
2538 call void @llvm.assume(i1 %ugt.pos1)
2539 %cmp = fcmp one float %arg, 0.0
2543 define i1 @assume_ugt_pos1__ord_0(float %arg) {
2544 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ord_0(
2545 ; CHECK-SAME: float [[ARG:%.*]]) {
2546 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2547 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2548 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2549 ; CHECK-NEXT: ret i1 [[CMP]]
2551 %ugt.pos1 = fcmp ugt float %arg, 1.0
2552 call void @llvm.assume(i1 %ugt.pos1)
2553 %cmp = fcmp ord float %arg, 0.0
2557 define i1 @assume_ugt_pos1__ueq_0(float %arg) {
2558 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ueq_0(
2559 ; CHECK-SAME: float [[ARG:%.*]]) {
2560 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2561 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2562 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2563 ; CHECK-NEXT: ret i1 [[CMP]]
2565 %ugt.pos1 = fcmp ugt float %arg, 1.0
2566 call void @llvm.assume(i1 %ugt.pos1)
2567 %cmp = fcmp ueq float %arg, 0.0
2571 define i1 @assume_ugt_pos1__ugt_0(float %arg) {
2572 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ugt_0(
2573 ; CHECK-SAME: float [[ARG:%.*]]) {
2574 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2575 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2576 ; CHECK-NEXT: ret i1 true
2578 %ugt.pos1 = fcmp ugt float %arg, 1.0
2579 call void @llvm.assume(i1 %ugt.pos1)
2580 %cmp = fcmp ugt float %arg, 0.0
2584 define i1 @assume_ugt_pos1__uge_0(float %arg) {
2585 ; CHECK-LABEL: define i1 @assume_ugt_pos1__uge_0(
2586 ; CHECK-SAME: float [[ARG:%.*]]) {
2587 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2588 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2589 ; CHECK-NEXT: ret i1 true
2591 %ugt.pos1 = fcmp ugt float %arg, 1.0
2592 call void @llvm.assume(i1 %ugt.pos1)
2593 %cmp = fcmp uge float %arg, 0.0
2597 define i1 @assume_ugt_pos1__ult_0(float %arg) {
2598 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ult_0(
2599 ; CHECK-SAME: float [[ARG:%.*]]) {
2600 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2601 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2602 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2603 ; CHECK-NEXT: ret i1 [[CMP]]
2605 %ugt.pos1 = fcmp ugt float %arg, 1.0
2606 call void @llvm.assume(i1 %ugt.pos1)
2607 %cmp = fcmp ult float %arg, 0.0
2611 define i1 @assume_ugt_pos1__ule_0(float %arg) {
2612 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ule_0(
2613 ; CHECK-SAME: float [[ARG:%.*]]) {
2614 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2615 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2616 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2617 ; CHECK-NEXT: ret i1 [[CMP]]
2619 %ugt.pos1 = fcmp ugt float %arg, 1.0
2620 call void @llvm.assume(i1 %ugt.pos1)
2621 %cmp = fcmp ule float %arg, 0.0
2625 define i1 @assume_ugt_pos1__une_0(float %arg) {
2626 ; CHECK-LABEL: define i1 @assume_ugt_pos1__une_0(
2627 ; CHECK-SAME: float [[ARG:%.*]]) {
2628 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2629 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2630 ; CHECK-NEXT: ret i1 true
2632 %ugt.pos1 = fcmp ugt float %arg, 1.0
2633 call void @llvm.assume(i1 %ugt.pos1)
2634 %cmp = fcmp une float %arg, 0.0
2638 define i1 @assume_ugt_pos1__uno_0(float %arg) {
2639 ; CHECK-LABEL: define i1 @assume_ugt_pos1__uno_0(
2640 ; CHECK-SAME: float [[ARG:%.*]]) {
2641 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2642 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2643 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2644 ; CHECK-NEXT: ret i1 [[CMP]]
2646 %ugt.pos1 = fcmp ugt float %arg, 1.0
2647 call void @llvm.assume(i1 %ugt.pos1)
2648 %cmp = fcmp uno float %arg, 0.0
2652 ; --------------------------------------------------------------------
2653 ; Test assume x u>= 1.0 with compares to 0
2654 ; --------------------------------------------------------------------
2656 define i1 @assume_uge_pos1__oeq_0(float %arg) {
2657 ; CHECK-LABEL: define i1 @assume_uge_pos1__oeq_0(
2658 ; CHECK-SAME: float [[ARG:%.*]]) {
2659 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2660 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2661 ; CHECK-NEXT: ret i1 false
2663 %uge.pos1 = fcmp uge float %arg, 1.0
2664 call void @llvm.assume(i1 %uge.pos1)
2665 %cmp = fcmp oeq float %arg, 0.0
2669 define i1 @assume_uge_pos1__ogt_0(float %arg) {
2670 ; CHECK-LABEL: define i1 @assume_uge_pos1__ogt_0(
2671 ; CHECK-SAME: float [[ARG:%.*]]) {
2672 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2673 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2674 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2675 ; CHECK-NEXT: ret i1 [[CMP]]
2677 %uge.pos1 = fcmp uge float %arg, 1.0
2678 call void @llvm.assume(i1 %uge.pos1)
2679 %cmp = fcmp ogt float %arg, 0.0
2683 define i1 @assume_uge_pos1__oge_0(float %arg) {
2684 ; CHECK-LABEL: define i1 @assume_uge_pos1__oge_0(
2685 ; CHECK-SAME: float [[ARG:%.*]]) {
2686 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2687 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2688 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2689 ; CHECK-NEXT: ret i1 [[CMP]]
2691 %uge.pos1 = fcmp uge float %arg, 1.0
2692 call void @llvm.assume(i1 %uge.pos1)
2693 %cmp = fcmp oge float %arg, 0.0
2697 define i1 @assume_uge_pos1__olt_0(float %arg) {
2698 ; CHECK-LABEL: define i1 @assume_uge_pos1__olt_0(
2699 ; CHECK-SAME: float [[ARG:%.*]]) {
2700 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2701 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2702 ; CHECK-NEXT: ret i1 false
2704 %uge.pos1 = fcmp uge float %arg, 1.0
2705 call void @llvm.assume(i1 %uge.pos1)
2706 %cmp = fcmp olt float %arg, 0.0
2710 define i1 @assume_uge_pos1__ole_0(float %arg) {
2711 ; CHECK-LABEL: define i1 @assume_uge_pos1__ole_0(
2712 ; CHECK-SAME: float [[ARG:%.*]]) {
2713 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2714 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2715 ; CHECK-NEXT: ret i1 false
2717 %uge.pos1 = fcmp uge float %arg, 1.0
2718 call void @llvm.assume(i1 %uge.pos1)
2719 %cmp = fcmp ole float %arg, 0.0
2723 define i1 @assume_uge_pos1__one_0(float %arg) {
2724 ; CHECK-LABEL: define i1 @assume_uge_pos1__one_0(
2725 ; CHECK-SAME: float [[ARG:%.*]]) {
2726 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2727 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2728 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2729 ; CHECK-NEXT: ret i1 [[CMP]]
2731 %uge.pos1 = fcmp uge float %arg, 1.0
2732 call void @llvm.assume(i1 %uge.pos1)
2733 %cmp = fcmp one float %arg, 0.0
2737 define i1 @assume_uge_pos1__ord_0(float %arg) {
2738 ; CHECK-LABEL: define i1 @assume_uge_pos1__ord_0(
2739 ; CHECK-SAME: float [[ARG:%.*]]) {
2740 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2741 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2742 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2743 ; CHECK-NEXT: ret i1 [[CMP]]
2745 %uge.pos1 = fcmp uge float %arg, 1.0
2746 call void @llvm.assume(i1 %uge.pos1)
2747 %cmp = fcmp ord float %arg, 0.0
2751 define i1 @assume_uge_pos1__ueq_0(float %arg) {
2752 ; CHECK-LABEL: define i1 @assume_uge_pos1__ueq_0(
2753 ; CHECK-SAME: float [[ARG:%.*]]) {
2754 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2755 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2756 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2757 ; CHECK-NEXT: ret i1 [[CMP]]
2759 %uge.pos1 = fcmp uge float %arg, 1.0
2760 call void @llvm.assume(i1 %uge.pos1)
2761 %cmp = fcmp ueq float %arg, 0.0
2765 define i1 @assume_uge_pos1__ugt_0(float %arg) {
2766 ; CHECK-LABEL: define i1 @assume_uge_pos1__ugt_0(
2767 ; CHECK-SAME: float [[ARG:%.*]]) {
2768 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2769 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2770 ; CHECK-NEXT: ret i1 true
2772 %uge.pos1 = fcmp uge float %arg, 1.0
2773 call void @llvm.assume(i1 %uge.pos1)
2774 %cmp = fcmp ugt float %arg, 0.0
2778 define i1 @assume_uge_pos1__uge_0(float %arg) {
2779 ; CHECK-LABEL: define i1 @assume_uge_pos1__uge_0(
2780 ; CHECK-SAME: float [[ARG:%.*]]) {
2781 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2782 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2783 ; CHECK-NEXT: ret i1 true
2785 %uge.pos1 = fcmp uge float %arg, 1.0
2786 call void @llvm.assume(i1 %uge.pos1)
2787 %cmp = fcmp uge float %arg, 0.0
2791 define i1 @assume_uge_pos1__ult_0(float %arg) {
2792 ; CHECK-LABEL: define i1 @assume_uge_pos1__ult_0(
2793 ; CHECK-SAME: float [[ARG:%.*]]) {
2794 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2795 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2796 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2797 ; CHECK-NEXT: ret i1 [[CMP]]
2799 %uge.pos1 = fcmp uge float %arg, 1.0
2800 call void @llvm.assume(i1 %uge.pos1)
2801 %cmp = fcmp ult float %arg, 0.0
2805 define i1 @assume_uge_pos1__ule_0(float %arg) {
2806 ; CHECK-LABEL: define i1 @assume_uge_pos1__ule_0(
2807 ; CHECK-SAME: float [[ARG:%.*]]) {
2808 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2809 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2810 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2811 ; CHECK-NEXT: ret i1 [[CMP]]
2813 %uge.pos1 = fcmp uge float %arg, 1.0
2814 call void @llvm.assume(i1 %uge.pos1)
2815 %cmp = fcmp ule float %arg, 0.0
2819 define i1 @assume_uge_pos1__une_0(float %arg) {
2820 ; CHECK-LABEL: define i1 @assume_uge_pos1__une_0(
2821 ; CHECK-SAME: float [[ARG:%.*]]) {
2822 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2823 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2824 ; CHECK-NEXT: ret i1 true
2826 %uge.pos1 = fcmp uge float %arg, 1.0
2827 call void @llvm.assume(i1 %uge.pos1)
2828 %cmp = fcmp une float %arg, 0.0
2832 define i1 @assume_uge_pos1__uno_0(float %arg) {
2833 ; CHECK-LABEL: define i1 @assume_uge_pos1__uno_0(
2834 ; CHECK-SAME: float [[ARG:%.*]]) {
2835 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2836 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2837 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2838 ; CHECK-NEXT: ret i1 [[CMP]]
2840 %uge.pos1 = fcmp uge float %arg, 1.0
2841 call void @llvm.assume(i1 %uge.pos1)
2842 %cmp = fcmp uno float %arg, 0.0
2846 ; --------------------------------------------------------------------
2847 ; Test assume x < -1.0 with compares to inf
2848 ; --------------------------------------------------------------------
2850 define i1 @assume_olt_neg1__oeq_inf(float %arg) {
2851 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_inf(
2852 ; CHECK-SAME: float [[ARG:%.*]]) {
2853 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2854 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2855 ; CHECK-NEXT: ret i1 false
2857 %olt.neg1 = fcmp olt float %arg, -1.0
2858 call void @llvm.assume(i1 %olt.neg1)
2859 %cmp = fcmp oeq float %arg, 0x7FF0000000000000
2863 define i1 @assume_olt_neg1__one_inf(float %arg) {
2864 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_inf(
2865 ; CHECK-SAME: float [[ARG:%.*]]) {
2866 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2867 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2868 ; CHECK-NEXT: ret i1 true
2870 %olt.neg1 = fcmp olt float %arg, -1.0
2871 call void @llvm.assume(i1 %olt.neg1)
2872 %cmp = fcmp one float %arg, 0x7FF0000000000000
2876 define i1 @assume_olt_neg1__oeq_ninf(float %arg) {
2877 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_ninf(
2878 ; CHECK-SAME: float [[ARG:%.*]]) {
2879 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2880 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2881 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
2882 ; CHECK-NEXT: ret i1 [[CMP]]
2884 %olt.neg1 = fcmp olt float %arg, -1.0
2885 call void @llvm.assume(i1 %olt.neg1)
2886 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
2890 define i1 @assume_olt_neg1__one_ninf(float %arg) {
2891 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_ninf(
2892 ; CHECK-SAME: float [[ARG:%.*]]) {
2893 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2894 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2895 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0xFFF0000000000000
2896 ; CHECK-NEXT: ret i1 [[CMP]]
2898 %olt.neg1 = fcmp olt float %arg, -1.0
2899 call void @llvm.assume(i1 %olt.neg1)
2900 %cmp = fcmp one float %arg, 0xFFF0000000000000
2904 ; --------------------------------------------------------------------
2906 ; --------------------------------------------------------------------
2908 define i1 @assume_olt_1__oeq_2(float %arg) {
2909 ; CHECK-LABEL: define i1 @assume_olt_1__oeq_2(
2910 ; CHECK-SAME: float [[ARG:%.*]]) {
2911 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
2912 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
2913 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 2.000000e+00
2914 ; CHECK-NEXT: ret i1 [[CMP]]
2916 %olt.1 = fcmp olt float %arg, 1.0
2917 call void @llvm.assume(i1 %olt.1)
2918 %cmp = fcmp oeq float %arg, 2.0
2922 ; Ideally would fold to false
2923 define i1 @assume_ogt_2__oeq_2(float %arg) {
2924 ; CHECK-LABEL: define i1 @assume_ogt_2__oeq_2(
2925 ; CHECK-SAME: float [[ARG:%.*]]) {
2926 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp ogt float [[ARG]], 2.000000e+00
2927 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
2928 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 2.000000e+00
2929 ; CHECK-NEXT: ret i1 [[CMP]]
2931 %olt.1 = fcmp ogt float %arg, 2.0
2932 call void @llvm.assume(i1 %olt.1)
2933 %cmp = fcmp oeq float %arg, 2.0
2937 define i1 @assume_olt_2__olt_1(float %arg) {
2938 ; CHECK-LABEL: define i1 @assume_olt_2__olt_1(
2939 ; CHECK-SAME: float [[ARG:%.*]]) {
2940 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp olt float [[ARG]], 2.000000e+00
2941 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
2942 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
2943 ; CHECK-NEXT: ret i1 [[CMP]]
2945 %olt.1 = fcmp olt float %arg, 2.0
2946 call void @llvm.assume(i1 %olt.1)
2947 %cmp = fcmp olt float %arg, 1.0
2951 ; --------------------------------------------------------------------
2953 ; --------------------------------------------------------------------
2955 define i1 @assume_ogt_neginf_one_neginf(float %arg) {
2956 ; CHECK-LABEL: define i1 @assume_ogt_neginf_one_neginf(
2957 ; CHECK-SAME: float [[ARG:%.*]]) {
2958 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[ARG]], 0xFFF0000000000000
2959 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
2960 ; CHECK-NEXT: ret i1 true
2962 %cmp.ogt.neginf = fcmp ogt float %arg, 0xFFF0000000000000
2963 call void @llvm.assume(i1 %cmp.ogt.neginf)
2964 %cmp = fcmp one float %arg, 0xFFF0000000000000
2968 define i1 @assume_ogt_neginf_oeq_posinf(float %arg) {
2969 ; CHECK-LABEL: define i1 @assume_ogt_neginf_oeq_posinf(
2970 ; CHECK-SAME: float [[ARG:%.*]]) {
2971 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[ARG]], 0xFFF0000000000000
2972 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
2973 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0x7FF0000000000000
2974 ; CHECK-NEXT: ret i1 [[CMP]]
2976 %cmp.ogt.neginf = fcmp ogt float %arg, 0xFFF0000000000000
2977 call void @llvm.assume(i1 %cmp.ogt.neginf)
2978 %cmp = fcmp oeq float %arg, 0x7FF0000000000000
2982 define i1 @assume_ule_neginf_oeq_neginf(float %arg) {
2983 ; CHECK-LABEL: define i1 @assume_ule_neginf_oeq_neginf(
2984 ; CHECK-SAME: float [[ARG:%.*]]) {
2985 ; CHECK-NEXT: [[CMP_ULE_NEGINF:%.*]] = fcmp ule float [[ARG]], 0xFFF0000000000000
2986 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_ULE_NEGINF]])
2987 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
2988 ; CHECK-NEXT: ret i1 [[CMP]]
2990 %cmp.ule.neginf = fcmp ule float %arg, 0xFFF0000000000000
2991 call void @llvm.assume(i1 %cmp.ule.neginf)
2992 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
2996 define i1 @assume_ult_neginf_oeq_neginf(float %arg) {
2997 ; CHECK-LABEL: define i1 @assume_ult_neginf_oeq_neginf(
2998 ; CHECK-SAME: float [[ARG:%.*]]) {
2999 ; CHECK-NEXT: [[CMP_ULT_NEGINF:%.*]] = fcmp ult float [[ARG]], 0xFFF0000000000000
3000 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_ULT_NEGINF]])
3001 ; CHECK-NEXT: ret i1 false
3003 %cmp.ult.neginf = fcmp ult float %arg, 0xFFF0000000000000
3004 call void @llvm.assume(i1 %cmp.ult.neginf)
3005 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3009 define i1 @assume_fabs_ogt_neginf_one_neginf(float %arg) {
3010 ; CHECK-LABEL: define i1 @assume_fabs_ogt_neginf_one_neginf(
3011 ; CHECK-SAME: float [[ARG:%.*]]) {
3012 ; CHECK-NEXT: [[FABS_ARG:%.*]] = call float @llvm.fabs.f32(float [[ARG]])
3013 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[FABS_ARG]], 0xFFF0000000000000
3014 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3015 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0xFFF0000000000000
3016 ; CHECK-NEXT: ret i1 [[CMP]]
3018 %fabs.arg = call float @llvm.fabs.f32(float %arg)
3019 %cmp.ogt.neginf = fcmp ogt float %fabs.arg, 0xFFF0000000000000
3020 call void @llvm.assume(i1 %cmp.ogt.neginf)
3021 %cmp = fcmp one float %arg, 0xFFF0000000000000
3025 define i1 @assume_fabs_ogt_neginf_one_posinf(float %arg) {
3026 ; CHECK-LABEL: define i1 @assume_fabs_ogt_neginf_one_posinf(
3027 ; CHECK-SAME: float [[ARG:%.*]]) {
3028 ; CHECK-NEXT: [[FABS_ARG:%.*]] = call float @llvm.fabs.f32(float [[ARG]])
3029 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[FABS_ARG]], 0xFFF0000000000000
3030 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3031 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0x7FF0000000000000
3032 ; CHECK-NEXT: ret i1 [[CMP]]
3034 %fabs.arg = call float @llvm.fabs.f32(float %arg)
3035 %cmp.ogt.neginf = fcmp ogt float %fabs.arg, 0xFFF0000000000000
3036 call void @llvm.assume(i1 %cmp.ogt.neginf)
3037 %cmp = fcmp one float %arg, 0x7FF0000000000000
3041 define i1 @assume_fabs_ule_neginf_oeq_neginf(float %arg) {
3042 ; CHECK-LABEL: define i1 @assume_fabs_ule_neginf_oeq_neginf(
3043 ; CHECK-SAME: float [[ARG:%.*]]) {
3044 ; CHECK-NEXT: [[FABS_ARG:%.*]] = call float @llvm.fabs.f32(float [[ARG]])
3045 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ule float [[FABS_ARG]], 0xFFF0000000000000
3046 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3047 ; CHECK-NEXT: ret i1 false
3049 %fabs.arg = call float @llvm.fabs.f32(float %arg)
3050 %cmp.ogt.neginf = fcmp ule float %fabs.arg, 0xFFF0000000000000
3051 call void @llvm.assume(i1 %cmp.ogt.neginf)
3052 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3056 define i1 @assume_oge_neginf_oeq_neginf(float %arg) {
3057 ; CHECK-LABEL: define i1 @assume_oge_neginf_oeq_neginf(
3058 ; CHECK-SAME: float [[ARG:%.*]]) {
3059 ; CHECK-NEXT: [[CMP_OGE_NEGINF:%.*]] = fcmp oge float [[ARG]], 0xFFF0000000000000
3060 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGE_NEGINF]])
3061 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
3062 ; CHECK-NEXT: ret i1 [[CMP]]
3064 %cmp.oge.neginf = fcmp oge float %arg, 0xFFF0000000000000
3065 call void @llvm.assume(i1 %cmp.oge.neginf)
3066 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3070 attributes #0 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }