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
10 ; --------------------------------------------------------------------
11 ; Test assume x < -1.0 with compares to 0
12 ; --------------------------------------------------------------------
14 define i1 @assume_olt_neg1__oeq_0(float %arg) {
15 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_0(
16 ; CHECK-SAME: float [[ARG:%.*]]) {
17 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
18 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
19 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
20 ; CHECK-NEXT: ret i1 [[CMP]]
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: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
34 ; CHECK-NEXT: ret i1 [[CMP]]
36 %olt.neg1 = fcmp olt float %arg, -1.0
37 call void @llvm.assume(i1 %olt.neg1)
38 %cmp = fcmp ogt float %arg, 0.0
42 define i1 @assume_olt_neg1__oge_0(float %arg) {
43 ; CHECK-LABEL: define i1 @assume_olt_neg1__oge_0(
44 ; CHECK-SAME: float [[ARG:%.*]]) {
45 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
46 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
47 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
48 ; CHECK-NEXT: ret i1 [[CMP]]
50 %olt.neg1 = fcmp olt float %arg, -1.0
51 call void @llvm.assume(i1 %olt.neg1)
52 %cmp = fcmp oge float %arg, 0.0
56 define i1 @assume_olt_neg1__olt_0(float %arg) {
57 ; CHECK-LABEL: define i1 @assume_olt_neg1__olt_0(
58 ; CHECK-SAME: float [[ARG:%.*]]) {
59 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
60 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
61 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
62 ; CHECK-NEXT: ret i1 [[CMP]]
64 %olt.neg1 = fcmp olt float %arg, -1.0
65 call void @llvm.assume(i1 %olt.neg1)
66 %cmp = fcmp olt float %arg, 0.0
70 define i1 @assume_olt_neg1__ole_0(float %arg) {
71 ; CHECK-LABEL: define i1 @assume_olt_neg1__ole_0(
72 ; CHECK-SAME: float [[ARG:%.*]]) {
73 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
74 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
75 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
76 ; CHECK-NEXT: ret i1 [[CMP]]
78 %olt.neg1 = fcmp olt float %arg, -1.0
79 call void @llvm.assume(i1 %olt.neg1)
80 %cmp = fcmp ole float %arg, 0.0
84 define i1 @assume_olt_neg1__one_0(float %arg) {
85 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_0(
86 ; CHECK-SAME: float [[ARG:%.*]]) {
87 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
88 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
89 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
90 ; CHECK-NEXT: ret i1 [[CMP]]
92 %olt.neg1 = fcmp olt float %arg, -1.0
93 call void @llvm.assume(i1 %olt.neg1)
94 %cmp = fcmp one float %arg, 0.0
98 define i1 @assume_olt_neg1__ord_0(float %arg) {
99 ; CHECK-LABEL: define i1 @assume_olt_neg1__ord_0(
100 ; CHECK-SAME: float [[ARG:%.*]]) {
101 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
102 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
103 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
104 ; CHECK-NEXT: ret i1 [[CMP]]
106 %olt.neg1 = fcmp olt float %arg, -1.0
107 call void @llvm.assume(i1 %olt.neg1)
108 %cmp = fcmp ord float %arg, 0.0
112 define i1 @assume_olt_neg1__ueq_0(float %arg) {
113 ; CHECK-LABEL: define i1 @assume_olt_neg1__ueq_0(
114 ; CHECK-SAME: float [[ARG:%.*]]) {
115 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
116 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
117 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
118 ; CHECK-NEXT: ret i1 [[CMP]]
120 %olt.neg1 = fcmp olt float %arg, -1.0
121 call void @llvm.assume(i1 %olt.neg1)
122 %cmp = fcmp ueq float %arg, 0.0
126 define i1 @assume_olt_neg1__ugt_0(float %arg) {
127 ; CHECK-LABEL: define i1 @assume_olt_neg1__ugt_0(
128 ; CHECK-SAME: float [[ARG:%.*]]) {
129 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
130 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
131 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
132 ; CHECK-NEXT: ret i1 [[CMP]]
134 %olt.neg1 = fcmp olt float %arg, -1.0
135 call void @llvm.assume(i1 %olt.neg1)
136 %cmp = fcmp ugt float %arg, 0.0
140 define i1 @assume_olt_neg1__uge_0(float %arg) {
141 ; CHECK-LABEL: define i1 @assume_olt_neg1__uge_0(
142 ; CHECK-SAME: float [[ARG:%.*]]) {
143 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
144 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
145 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
146 ; CHECK-NEXT: ret i1 [[CMP]]
148 %olt.neg1 = fcmp olt float %arg, -1.0
149 call void @llvm.assume(i1 %olt.neg1)
150 %cmp = fcmp uge float %arg, 0.0
154 define i1 @assume_olt_neg1__ult_0(float %arg) {
155 ; CHECK-LABEL: define i1 @assume_olt_neg1__ult_0(
156 ; CHECK-SAME: float [[ARG:%.*]]) {
157 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
158 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
159 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
160 ; CHECK-NEXT: ret i1 [[CMP]]
162 %olt.neg1 = fcmp olt float %arg, -1.0
163 call void @llvm.assume(i1 %olt.neg1)
164 %cmp = fcmp ult float %arg, 0.0
168 define i1 @assume_olt_neg1__ule_0(float %arg) {
169 ; CHECK-LABEL: define i1 @assume_olt_neg1__ule_0(
170 ; CHECK-SAME: float [[ARG:%.*]]) {
171 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
172 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
173 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
174 ; CHECK-NEXT: ret i1 [[CMP]]
176 %olt.neg1 = fcmp olt float %arg, -1.0
177 call void @llvm.assume(i1 %olt.neg1)
178 %cmp = fcmp ule float %arg, 0.0
182 define i1 @assume_olt_neg1__une_0(float %arg) {
183 ; CHECK-LABEL: define i1 @assume_olt_neg1__une_0(
184 ; CHECK-SAME: float [[ARG:%.*]]) {
185 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
186 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
187 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
188 ; CHECK-NEXT: ret i1 [[CMP]]
190 %olt.neg1 = fcmp olt float %arg, -1.0
191 call void @llvm.assume(i1 %olt.neg1)
192 %cmp = fcmp une float %arg, 0.0
196 define i1 @assume_olt_neg1__uno_0(float %arg) {
197 ; CHECK-LABEL: define i1 @assume_olt_neg1__uno_0(
198 ; CHECK-SAME: float [[ARG:%.*]]) {
199 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
200 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
201 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
202 ; CHECK-NEXT: ret i1 [[CMP]]
204 %olt.neg1 = fcmp olt float %arg, -1.0
205 call void @llvm.assume(i1 %olt.neg1)
206 %cmp = fcmp uno float %arg, 0.0
210 ; --------------------------------------------------------------------
211 ; Test assume x <= -1.0 with compares to 0
212 ; --------------------------------------------------------------------
214 define i1 @assume_ole_neg1__oeq_0(float %arg) {
215 ; CHECK-LABEL: define i1 @assume_ole_neg1__oeq_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: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
220 ; CHECK-NEXT: ret i1 [[CMP]]
222 %ole.neg1 = fcmp ole float %arg, -1.0
223 call void @llvm.assume(i1 %ole.neg1)
224 %cmp = fcmp oeq float %arg, 0.0
228 define i1 @assume_ole_neg1__ogt_0(float %arg) {
229 ; CHECK-LABEL: define i1 @assume_ole_neg1__ogt_0(
230 ; CHECK-SAME: float [[ARG:%.*]]) {
231 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
232 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
233 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
234 ; CHECK-NEXT: ret i1 [[CMP]]
236 %ole.neg1 = fcmp ole float %arg, -1.0
237 call void @llvm.assume(i1 %ole.neg1)
238 %cmp = fcmp ogt float %arg, 0.0
242 define i1 @assume_ole_neg1__oge_0(float %arg) {
243 ; CHECK-LABEL: define i1 @assume_ole_neg1__oge_0(
244 ; CHECK-SAME: float [[ARG:%.*]]) {
245 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
246 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
247 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
248 ; CHECK-NEXT: ret i1 [[CMP]]
250 %ole.neg1 = fcmp ole float %arg, -1.0
251 call void @llvm.assume(i1 %ole.neg1)
252 %cmp = fcmp oge float %arg, 0.0
256 define i1 @assume_ole_neg1__olt_0(float %arg) {
257 ; CHECK-LABEL: define i1 @assume_ole_neg1__olt_0(
258 ; CHECK-SAME: float [[ARG:%.*]]) {
259 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
260 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
261 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
262 ; CHECK-NEXT: ret i1 [[CMP]]
264 %ole.neg1 = fcmp ole float %arg, -1.0
265 call void @llvm.assume(i1 %ole.neg1)
266 %cmp = fcmp olt float %arg, 0.0
270 define i1 @assume_ole_neg1__ole_0(float %arg) {
271 ; CHECK-LABEL: define i1 @assume_ole_neg1__ole_0(
272 ; CHECK-SAME: float [[ARG:%.*]]) {
273 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
274 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
275 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
276 ; CHECK-NEXT: ret i1 [[CMP]]
278 %ole.neg1 = fcmp ole float %arg, -1.0
279 call void @llvm.assume(i1 %ole.neg1)
280 %cmp = fcmp ole float %arg, 0.0
284 define i1 @assume_ole_neg1__one_0(float %arg) {
285 ; CHECK-LABEL: define i1 @assume_ole_neg1__one_0(
286 ; CHECK-SAME: float [[ARG:%.*]]) {
287 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
288 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
289 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
290 ; CHECK-NEXT: ret i1 [[CMP]]
292 %ole.neg1 = fcmp ole float %arg, -1.0
293 call void @llvm.assume(i1 %ole.neg1)
294 %cmp = fcmp one float %arg, 0.0
298 define i1 @assume_ole_neg1__ord_0(float %arg) {
299 ; CHECK-LABEL: define i1 @assume_ole_neg1__ord_0(
300 ; CHECK-SAME: float [[ARG:%.*]]) {
301 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
302 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
303 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
304 ; CHECK-NEXT: ret i1 [[CMP]]
306 %ole.neg1 = fcmp ole float %arg, -1.0
307 call void @llvm.assume(i1 %ole.neg1)
308 %cmp = fcmp ord float %arg, 0.0
312 define i1 @assume_ole_neg1__ueq_0(float %arg) {
313 ; CHECK-LABEL: define i1 @assume_ole_neg1__ueq_0(
314 ; CHECK-SAME: float [[ARG:%.*]]) {
315 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
316 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
317 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
318 ; CHECK-NEXT: ret i1 [[CMP]]
320 %ole.neg1 = fcmp ole float %arg, -1.0
321 call void @llvm.assume(i1 %ole.neg1)
322 %cmp = fcmp ueq float %arg, 0.0
326 define i1 @assume_ole_neg1__ugt_0(float %arg) {
327 ; CHECK-LABEL: define i1 @assume_ole_neg1__ugt_0(
328 ; CHECK-SAME: float [[ARG:%.*]]) {
329 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
330 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
331 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
332 ; CHECK-NEXT: ret i1 [[CMP]]
334 %ole.neg1 = fcmp ole float %arg, -1.0
335 call void @llvm.assume(i1 %ole.neg1)
336 %cmp = fcmp ugt float %arg, 0.0
340 define i1 @assume_ole_neg1__uge_0(float %arg) {
341 ; CHECK-LABEL: define i1 @assume_ole_neg1__uge_0(
342 ; CHECK-SAME: float [[ARG:%.*]]) {
343 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
344 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
345 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
346 ; CHECK-NEXT: ret i1 [[CMP]]
348 %ole.neg1 = fcmp ole float %arg, -1.0
349 call void @llvm.assume(i1 %ole.neg1)
350 %cmp = fcmp uge float %arg, 0.0
354 define i1 @assume_ole_neg1__ult_0(float %arg) {
355 ; CHECK-LABEL: define i1 @assume_ole_neg1__ult_0(
356 ; CHECK-SAME: float [[ARG:%.*]]) {
357 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
358 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
359 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
360 ; CHECK-NEXT: ret i1 [[CMP]]
362 %ole.neg1 = fcmp ole float %arg, -1.0
363 call void @llvm.assume(i1 %ole.neg1)
364 %cmp = fcmp ult float %arg, 0.0
368 define i1 @assume_ole_neg1__ule_0(float %arg) {
369 ; CHECK-LABEL: define i1 @assume_ole_neg1__ule_0(
370 ; CHECK-SAME: float [[ARG:%.*]]) {
371 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
372 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
373 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
374 ; CHECK-NEXT: ret i1 [[CMP]]
376 %ole.neg1 = fcmp ole float %arg, -1.0
377 call void @llvm.assume(i1 %ole.neg1)
378 %cmp = fcmp ule float %arg, 0.0
382 define i1 @assume_ole_neg1__une_0(float %arg) {
383 ; CHECK-LABEL: define i1 @assume_ole_neg1__une_0(
384 ; CHECK-SAME: float [[ARG:%.*]]) {
385 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
386 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
387 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
388 ; CHECK-NEXT: ret i1 [[CMP]]
390 %ole.neg1 = fcmp ole float %arg, -1.0
391 call void @llvm.assume(i1 %ole.neg1)
392 %cmp = fcmp une float %arg, 0.0
396 define i1 @assume_ole_neg1__uno_0(float %arg) {
397 ; CHECK-LABEL: define i1 @assume_ole_neg1__uno_0(
398 ; CHECK-SAME: float [[ARG:%.*]]) {
399 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
400 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
401 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
402 ; CHECK-NEXT: ret i1 [[CMP]]
404 %ole.neg1 = fcmp ole float %arg, -1.0
405 call void @llvm.assume(i1 %ole.neg1)
406 %cmp = fcmp uno float %arg, 0.0
410 ; --------------------------------------------------------------------
411 ; Test assume x > -1.0 with compares to 0
412 ; --------------------------------------------------------------------
414 define i1 @assume_ogt_neg1__oeq_0(float %arg) {
415 ; CHECK-LABEL: define i1 @assume_ogt_neg1__oeq_0(
416 ; CHECK-SAME: float [[ARG:%.*]]) {
417 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
418 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
419 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
420 ; CHECK-NEXT: ret i1 [[CMP]]
422 %ogt.neg1 = fcmp ogt float %arg, -1.0
423 call void @llvm.assume(i1 %ogt.neg1)
424 %cmp = fcmp oeq float %arg, 0.0
428 define i1 @assume_ogt_neg1__ogt_0(float %arg) {
429 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ogt_0(
430 ; CHECK-SAME: float [[ARG:%.*]]) {
431 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
432 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
433 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
434 ; CHECK-NEXT: ret i1 [[CMP]]
436 %ogt.neg1 = fcmp ogt float %arg, -1.0
437 call void @llvm.assume(i1 %ogt.neg1)
438 %cmp = fcmp ogt float %arg, 0.0
442 define i1 @assume_ogt_neg1__oge_0(float %arg) {
443 ; CHECK-LABEL: define i1 @assume_ogt_neg1__oge_0(
444 ; CHECK-SAME: float [[ARG:%.*]]) {
445 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
446 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
447 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
448 ; CHECK-NEXT: ret i1 [[CMP]]
450 %ogt.neg1 = fcmp ogt float %arg, -1.0
451 call void @llvm.assume(i1 %ogt.neg1)
452 %cmp = fcmp oge float %arg, 0.0
456 define i1 @assume_ogt_neg1__olt_0(float %arg) {
457 ; CHECK-LABEL: define i1 @assume_ogt_neg1__olt_0(
458 ; CHECK-SAME: float [[ARG:%.*]]) {
459 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
460 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
461 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
462 ; CHECK-NEXT: ret i1 [[CMP]]
464 %ogt.neg1 = fcmp ogt float %arg, -1.0
465 call void @llvm.assume(i1 %ogt.neg1)
466 %cmp = fcmp olt float %arg, 0.0
470 define i1 @assume_ogt_neg1__ole_0(float %arg) {
471 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ole_0(
472 ; CHECK-SAME: float [[ARG:%.*]]) {
473 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
474 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
475 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
476 ; CHECK-NEXT: ret i1 [[CMP]]
478 %ogt.neg1 = fcmp ogt float %arg, -1.0
479 call void @llvm.assume(i1 %ogt.neg1)
480 %cmp = fcmp ole float %arg, 0.0
484 define i1 @assume_ogt_neg1__one_0(float %arg) {
485 ; CHECK-LABEL: define i1 @assume_ogt_neg1__one_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 one 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 one float %arg, 0.0
498 define i1 @assume_ogt_neg1__ord_0(float %arg) {
499 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ord_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 ord 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 ord float %arg, 0.0
512 define i1 @assume_ogt_neg1__ueq_0(float %arg) {
513 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ueq_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 ueq 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 ueq float %arg, 0.0
526 define i1 @assume_ogt_neg1__ugt_0(float %arg) {
527 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ugt_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 ugt 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 ugt float %arg, 0.0
540 define i1 @assume_ogt_neg1__uge_0(float %arg) {
541 ; CHECK-LABEL: define i1 @assume_ogt_neg1__uge_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 uge 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 uge float %arg, 0.0
554 define i1 @assume_ogt_neg1__ult_0(float %arg) {
555 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ult_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 ult 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 ult float %arg, 0.0
568 define i1 @assume_ogt_neg1__ule_0(float %arg) {
569 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ule_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: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
574 ; CHECK-NEXT: ret i1 [[CMP]]
576 %ogt.neg1 = fcmp ogt float %arg, -1.0
577 call void @llvm.assume(i1 %ogt.neg1)
578 %cmp = fcmp ule float %arg, 0.0
582 define i1 @assume_ogt_neg1__une_0(float %arg) {
583 ; CHECK-LABEL: define i1 @assume_ogt_neg1__une_0(
584 ; CHECK-SAME: float [[ARG:%.*]]) {
585 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
586 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
587 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
588 ; CHECK-NEXT: ret i1 [[CMP]]
590 %ogt.neg1 = fcmp ogt float %arg, -1.0
591 call void @llvm.assume(i1 %ogt.neg1)
592 %cmp = fcmp une float %arg, 0.0
596 define i1 @assume_ogt_neg1__uno_0(float %arg) {
597 ; CHECK-LABEL: define i1 @assume_ogt_neg1__uno_0(
598 ; CHECK-SAME: float [[ARG:%.*]]) {
599 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
600 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
601 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
602 ; CHECK-NEXT: ret i1 [[CMP]]
604 %ogt.neg1 = fcmp ogt float %arg, -1.0
605 call void @llvm.assume(i1 %ogt.neg1)
606 %cmp = fcmp uno float %arg, 0.0
610 ; --------------------------------------------------------------------
611 ; Test assume x >= -1.0 with compares to 0
612 ; --------------------------------------------------------------------
614 define i1 @assume_oge_neg1__oeq_0(float %arg) {
615 ; CHECK-LABEL: define i1 @assume_oge_neg1__oeq_0(
616 ; CHECK-SAME: float [[ARG:%.*]]) {
617 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
618 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
619 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
620 ; CHECK-NEXT: ret i1 [[CMP]]
622 %oge.neg1 = fcmp oge float %arg, -1.0
623 call void @llvm.assume(i1 %oge.neg1)
624 %cmp = fcmp oeq float %arg, 0.0
628 define i1 @assume_oge_neg1__ogt_0(float %arg) {
629 ; CHECK-LABEL: define i1 @assume_oge_neg1__ogt_0(
630 ; CHECK-SAME: float [[ARG:%.*]]) {
631 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
632 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
633 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
634 ; CHECK-NEXT: ret i1 [[CMP]]
636 %oge.neg1 = fcmp oge float %arg, -1.0
637 call void @llvm.assume(i1 %oge.neg1)
638 %cmp = fcmp ogt float %arg, 0.0
642 define i1 @assume_oge_neg1__oge_0(float %arg) {
643 ; CHECK-LABEL: define i1 @assume_oge_neg1__oge_0(
644 ; CHECK-SAME: float [[ARG:%.*]]) {
645 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
646 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
647 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
648 ; CHECK-NEXT: ret i1 [[CMP]]
650 %oge.neg1 = fcmp oge float %arg, -1.0
651 call void @llvm.assume(i1 %oge.neg1)
652 %cmp = fcmp oge float %arg, 0.0
656 define i1 @assume_oge_neg1__olt_0(float %arg) {
657 ; CHECK-LABEL: define i1 @assume_oge_neg1__olt_0(
658 ; CHECK-SAME: float [[ARG:%.*]]) {
659 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
660 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
661 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
662 ; CHECK-NEXT: ret i1 [[CMP]]
664 %oge.neg1 = fcmp oge float %arg, -1.0
665 call void @llvm.assume(i1 %oge.neg1)
666 %cmp = fcmp olt float %arg, 0.0
670 define i1 @assume_oge_neg1__ole_0(float %arg) {
671 ; CHECK-LABEL: define i1 @assume_oge_neg1__ole_0(
672 ; CHECK-SAME: float [[ARG:%.*]]) {
673 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
674 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
675 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
676 ; CHECK-NEXT: ret i1 [[CMP]]
678 %oge.neg1 = fcmp oge float %arg, -1.0
679 call void @llvm.assume(i1 %oge.neg1)
680 %cmp = fcmp ole float %arg, 0.0
684 define i1 @assume_oge_neg1__one_0(float %arg) {
685 ; CHECK-LABEL: define i1 @assume_oge_neg1__one_0(
686 ; CHECK-SAME: float [[ARG:%.*]]) {
687 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
688 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
689 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
690 ; CHECK-NEXT: ret i1 [[CMP]]
692 %oge.neg1 = fcmp oge float %arg, -1.0
693 call void @llvm.assume(i1 %oge.neg1)
694 %cmp = fcmp one float %arg, 0.0
698 define i1 @assume_oge_neg1__ord_0(float %arg) {
699 ; CHECK-LABEL: define i1 @assume_oge_neg1__ord_0(
700 ; CHECK-SAME: float [[ARG:%.*]]) {
701 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
702 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
703 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
704 ; CHECK-NEXT: ret i1 [[CMP]]
706 %oge.neg1 = fcmp oge float %arg, -1.0
707 call void @llvm.assume(i1 %oge.neg1)
708 %cmp = fcmp ord float %arg, 0.0
712 define i1 @assume_oge_neg1__ueq_0(float %arg) {
713 ; CHECK-LABEL: define i1 @assume_oge_neg1__ueq_0(
714 ; CHECK-SAME: float [[ARG:%.*]]) {
715 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
716 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
717 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
718 ; CHECK-NEXT: ret i1 [[CMP]]
720 %oge.neg1 = fcmp oge float %arg, -1.0
721 call void @llvm.assume(i1 %oge.neg1)
722 %cmp = fcmp ueq float %arg, 0.0
726 define i1 @assume_oge_neg1__ugt_0(float %arg) {
727 ; CHECK-LABEL: define i1 @assume_oge_neg1__ugt_0(
728 ; CHECK-SAME: float [[ARG:%.*]]) {
729 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
730 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
731 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
732 ; CHECK-NEXT: ret i1 [[CMP]]
734 %oge.neg1 = fcmp oge float %arg, -1.0
735 call void @llvm.assume(i1 %oge.neg1)
736 %cmp = fcmp ugt float %arg, 0.0
740 define i1 @assume_oge_neg1__uge_0(float %arg) {
741 ; CHECK-LABEL: define i1 @assume_oge_neg1__uge_0(
742 ; CHECK-SAME: float [[ARG:%.*]]) {
743 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
744 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
745 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
746 ; CHECK-NEXT: ret i1 [[CMP]]
748 %oge.neg1 = fcmp oge float %arg, -1.0
749 call void @llvm.assume(i1 %oge.neg1)
750 %cmp = fcmp uge float %arg, 0.0
754 define i1 @assume_oge_neg1__ult_0(float %arg) {
755 ; CHECK-LABEL: define i1 @assume_oge_neg1__ult_0(
756 ; CHECK-SAME: float [[ARG:%.*]]) {
757 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
758 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
759 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
760 ; CHECK-NEXT: ret i1 [[CMP]]
762 %oge.neg1 = fcmp oge float %arg, -1.0
763 call void @llvm.assume(i1 %oge.neg1)
764 %cmp = fcmp ult float %arg, 0.0
768 define i1 @assume_oge_neg1__ule_0(float %arg) {
769 ; CHECK-LABEL: define i1 @assume_oge_neg1__ule_0(
770 ; CHECK-SAME: float [[ARG:%.*]]) {
771 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
772 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
773 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
774 ; CHECK-NEXT: ret i1 [[CMP]]
776 %oge.neg1 = fcmp oge float %arg, -1.0
777 call void @llvm.assume(i1 %oge.neg1)
778 %cmp = fcmp ule float %arg, 0.0
782 define i1 @assume_oge_neg1__une_0(float %arg) {
783 ; CHECK-LABEL: define i1 @assume_oge_neg1__une_0(
784 ; CHECK-SAME: float [[ARG:%.*]]) {
785 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
786 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
787 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
788 ; CHECK-NEXT: ret i1 [[CMP]]
790 %oge.neg1 = fcmp oge float %arg, -1.0
791 call void @llvm.assume(i1 %oge.neg1)
792 %cmp = fcmp une float %arg, 0.0
796 define i1 @assume_oge_neg1__uno_0(float %arg) {
797 ; CHECK-LABEL: define i1 @assume_oge_neg1__uno_0(
798 ; CHECK-SAME: float [[ARG:%.*]]) {
799 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
800 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
801 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
802 ; CHECK-NEXT: ret i1 [[CMP]]
804 %oge.neg1 = fcmp oge float %arg, -1.0
805 call void @llvm.assume(i1 %oge.neg1)
806 %cmp = fcmp uno float %arg, 0.0
810 ; --------------------------------------------------------------------
811 ; Test assume x u>= -1.0 with compares to 0
812 ; --------------------------------------------------------------------
814 define i1 @assume_uge_neg1__oeq_0(float %arg) {
815 ; CHECK-LABEL: define i1 @assume_uge_neg1__oeq_0(
816 ; CHECK-SAME: float [[ARG:%.*]]) {
817 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
818 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
819 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
820 ; CHECK-NEXT: ret i1 [[CMP]]
822 %uge.neg1 = fcmp uge float %arg, -1.0
823 call void @llvm.assume(i1 %uge.neg1)
824 %cmp = fcmp oeq float %arg, 0.0
828 define i1 @assume_uge_neg1__ogt_0(float %arg) {
829 ; CHECK-LABEL: define i1 @assume_uge_neg1__ogt_0(
830 ; CHECK-SAME: float [[ARG:%.*]]) {
831 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
832 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
833 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
834 ; CHECK-NEXT: ret i1 [[CMP]]
836 %uge.neg1 = fcmp uge float %arg, -1.0
837 call void @llvm.assume(i1 %uge.neg1)
838 %cmp = fcmp ogt float %arg, 0.0
842 define i1 @assume_uge_neg1__oge_0(float %arg) {
843 ; CHECK-LABEL: define i1 @assume_uge_neg1__oge_0(
844 ; CHECK-SAME: float [[ARG:%.*]]) {
845 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
846 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
847 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
848 ; CHECK-NEXT: ret i1 [[CMP]]
850 %uge.neg1 = fcmp uge float %arg, -1.0
851 call void @llvm.assume(i1 %uge.neg1)
852 %cmp = fcmp oge float %arg, 0.0
856 define i1 @assume_uge_neg1__olt_0(float %arg) {
857 ; CHECK-LABEL: define i1 @assume_uge_neg1__olt_0(
858 ; CHECK-SAME: float [[ARG:%.*]]) {
859 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
860 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
861 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
862 ; CHECK-NEXT: ret i1 [[CMP]]
864 %uge.neg1 = fcmp uge float %arg, -1.0
865 call void @llvm.assume(i1 %uge.neg1)
866 %cmp = fcmp olt float %arg, 0.0
870 define i1 @assume_uge_neg1__ole_0(float %arg) {
871 ; CHECK-LABEL: define i1 @assume_uge_neg1__ole_0(
872 ; CHECK-SAME: float [[ARG:%.*]]) {
873 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
874 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
875 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
876 ; CHECK-NEXT: ret i1 [[CMP]]
878 %uge.neg1 = fcmp uge float %arg, -1.0
879 call void @llvm.assume(i1 %uge.neg1)
880 %cmp = fcmp ole float %arg, 0.0
884 define i1 @assume_uge_neg1__one_0(float %arg) {
885 ; CHECK-LABEL: define i1 @assume_uge_neg1__one_0(
886 ; CHECK-SAME: float [[ARG:%.*]]) {
887 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
888 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
889 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
890 ; CHECK-NEXT: ret i1 [[CMP]]
892 %uge.neg1 = fcmp uge float %arg, -1.0
893 call void @llvm.assume(i1 %uge.neg1)
894 %cmp = fcmp one float %arg, 0.0
898 define i1 @assume_uge_neg1__ord_0(float %arg) {
899 ; CHECK-LABEL: define i1 @assume_uge_neg1__ord_0(
900 ; CHECK-SAME: float [[ARG:%.*]]) {
901 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
902 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
903 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
904 ; CHECK-NEXT: ret i1 [[CMP]]
906 %uge.neg1 = fcmp uge float %arg, -1.0
907 call void @llvm.assume(i1 %uge.neg1)
908 %cmp = fcmp ord float %arg, 0.0
912 define i1 @assume_uge_neg1__ueq_0(float %arg) {
913 ; CHECK-LABEL: define i1 @assume_uge_neg1__ueq_0(
914 ; CHECK-SAME: float [[ARG:%.*]]) {
915 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
916 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
917 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
918 ; CHECK-NEXT: ret i1 [[CMP]]
920 %uge.neg1 = fcmp uge float %arg, -1.0
921 call void @llvm.assume(i1 %uge.neg1)
922 %cmp = fcmp ueq float %arg, 0.0
926 define i1 @assume_uge_neg1__ugt_0(float %arg) {
927 ; CHECK-LABEL: define i1 @assume_uge_neg1__ugt_0(
928 ; CHECK-SAME: float [[ARG:%.*]]) {
929 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
930 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
931 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
932 ; CHECK-NEXT: ret i1 [[CMP]]
934 %uge.neg1 = fcmp uge float %arg, -1.0
935 call void @llvm.assume(i1 %uge.neg1)
936 %cmp = fcmp ugt float %arg, 0.0
940 define i1 @assume_uge_neg1__uge_0(float %arg) {
941 ; CHECK-LABEL: define i1 @assume_uge_neg1__uge_0(
942 ; CHECK-SAME: float [[ARG:%.*]]) {
943 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
944 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
945 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
946 ; CHECK-NEXT: ret i1 [[CMP]]
948 %uge.neg1 = fcmp uge float %arg, -1.0
949 call void @llvm.assume(i1 %uge.neg1)
950 %cmp = fcmp uge float %arg, 0.0
954 define i1 @assume_uge_neg1__ult_0(float %arg) {
955 ; CHECK-LABEL: define i1 @assume_uge_neg1__ult_0(
956 ; CHECK-SAME: float [[ARG:%.*]]) {
957 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
958 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
959 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
960 ; CHECK-NEXT: ret i1 [[CMP]]
962 %uge.neg1 = fcmp uge float %arg, -1.0
963 call void @llvm.assume(i1 %uge.neg1)
964 %cmp = fcmp ult float %arg, 0.0
968 define i1 @assume_uge_neg1__ule_0(float %arg) {
969 ; CHECK-LABEL: define i1 @assume_uge_neg1__ule_0(
970 ; CHECK-SAME: float [[ARG:%.*]]) {
971 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
972 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
973 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
974 ; CHECK-NEXT: ret i1 [[CMP]]
976 %uge.neg1 = fcmp uge float %arg, -1.0
977 call void @llvm.assume(i1 %uge.neg1)
978 %cmp = fcmp ule float %arg, 0.0
982 define i1 @assume_uge_neg1__une_0(float %arg) {
983 ; CHECK-LABEL: define i1 @assume_uge_neg1__une_0(
984 ; CHECK-SAME: float [[ARG:%.*]]) {
985 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
986 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
987 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
988 ; CHECK-NEXT: ret i1 [[CMP]]
990 %uge.neg1 = fcmp uge float %arg, -1.0
991 call void @llvm.assume(i1 %uge.neg1)
992 %cmp = fcmp une float %arg, 0.0
996 define i1 @assume_uge_neg1__uno_0(float %arg) {
997 ; CHECK-LABEL: define i1 @assume_uge_neg1__uno_0(
998 ; CHECK-SAME: float [[ARG:%.*]]) {
999 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
1000 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
1001 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1002 ; CHECK-NEXT: ret i1 [[CMP]]
1004 %uge.neg1 = fcmp uge float %arg, -1.0
1005 call void @llvm.assume(i1 %uge.neg1)
1006 %cmp = fcmp uno float %arg, 0.0
1010 ; --------------------------------------------------------------------
1011 ; Test assume x u> -1.0 with compares to 0
1012 ; --------------------------------------------------------------------
1014 define i1 @assume_ugt_neg1__oeq_0(float %arg) {
1015 ; CHECK-LABEL: define i1 @assume_ugt_neg1__oeq_0(
1016 ; CHECK-SAME: float [[ARG:%.*]]) {
1017 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1018 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1019 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1020 ; CHECK-NEXT: ret i1 [[CMP]]
1022 %ugt.neg1 = fcmp ugt float %arg, -1.0
1023 call void @llvm.assume(i1 %ugt.neg1)
1024 %cmp = fcmp oeq float %arg, 0.0
1028 define i1 @assume_ugt_neg1__ogt_0(float %arg) {
1029 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ogt_0(
1030 ; CHECK-SAME: float [[ARG:%.*]]) {
1031 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1032 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1033 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1034 ; CHECK-NEXT: ret i1 [[CMP]]
1036 %ugt.neg1 = fcmp ugt float %arg, -1.0
1037 call void @llvm.assume(i1 %ugt.neg1)
1038 %cmp = fcmp ogt float %arg, 0.0
1042 define i1 @assume_ugt_neg1__oge_0(float %arg) {
1043 ; CHECK-LABEL: define i1 @assume_ugt_neg1__oge_0(
1044 ; CHECK-SAME: float [[ARG:%.*]]) {
1045 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1046 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1047 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1048 ; CHECK-NEXT: ret i1 [[CMP]]
1050 %ugt.neg1 = fcmp ugt float %arg, -1.0
1051 call void @llvm.assume(i1 %ugt.neg1)
1052 %cmp = fcmp oge float %arg, 0.0
1056 define i1 @assume_ugt_neg1__olt_0(float %arg) {
1057 ; CHECK-LABEL: define i1 @assume_ugt_neg1__olt_0(
1058 ; CHECK-SAME: float [[ARG:%.*]]) {
1059 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1060 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1061 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1062 ; CHECK-NEXT: ret i1 [[CMP]]
1064 %ugt.neg1 = fcmp ugt float %arg, -1.0
1065 call void @llvm.assume(i1 %ugt.neg1)
1066 %cmp = fcmp olt float %arg, 0.0
1070 define i1 @assume_ugt_neg1__ole_0(float %arg) {
1071 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ole_0(
1072 ; CHECK-SAME: float [[ARG:%.*]]) {
1073 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1074 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1075 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1076 ; CHECK-NEXT: ret i1 [[CMP]]
1078 %ugt.neg1 = fcmp ugt float %arg, -1.0
1079 call void @llvm.assume(i1 %ugt.neg1)
1080 %cmp = fcmp ole float %arg, 0.0
1084 define i1 @assume_ugt_neg1__one_0(float %arg) {
1085 ; CHECK-LABEL: define i1 @assume_ugt_neg1__one_0(
1086 ; CHECK-SAME: float [[ARG:%.*]]) {
1087 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1088 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1089 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1090 ; CHECK-NEXT: ret i1 [[CMP]]
1092 %ugt.neg1 = fcmp ugt float %arg, -1.0
1093 call void @llvm.assume(i1 %ugt.neg1)
1094 %cmp = fcmp one float %arg, 0.0
1098 define i1 @assume_ugt_neg1__ord_0(float %arg) {
1099 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ord_0(
1100 ; CHECK-SAME: float [[ARG:%.*]]) {
1101 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1102 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1103 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1104 ; CHECK-NEXT: ret i1 [[CMP]]
1106 %ugt.neg1 = fcmp ugt float %arg, -1.0
1107 call void @llvm.assume(i1 %ugt.neg1)
1108 %cmp = fcmp ord float %arg, 0.0
1112 define i1 @assume_ugt_neg1__ueq_0(float %arg) {
1113 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ueq_0(
1114 ; CHECK-SAME: float [[ARG:%.*]]) {
1115 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1116 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1117 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1118 ; CHECK-NEXT: ret i1 [[CMP]]
1120 %ugt.neg1 = fcmp ugt float %arg, -1.0
1121 call void @llvm.assume(i1 %ugt.neg1)
1122 %cmp = fcmp ueq float %arg, 0.0
1126 define i1 @assume_ugt_neg1__ugt_0(float %arg) {
1127 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ugt_0(
1128 ; CHECK-SAME: float [[ARG:%.*]]) {
1129 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1130 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1131 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1132 ; CHECK-NEXT: ret i1 [[CMP]]
1134 %ugt.neg1 = fcmp ugt float %arg, -1.0
1135 call void @llvm.assume(i1 %ugt.neg1)
1136 %cmp = fcmp ugt float %arg, 0.0
1140 define i1 @assume_ugt_neg1__uge_0(float %arg) {
1141 ; CHECK-LABEL: define i1 @assume_ugt_neg1__uge_0(
1142 ; CHECK-SAME: float [[ARG:%.*]]) {
1143 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1144 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1145 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1146 ; CHECK-NEXT: ret i1 [[CMP]]
1148 %ugt.neg1 = fcmp ugt float %arg, -1.0
1149 call void @llvm.assume(i1 %ugt.neg1)
1150 %cmp = fcmp uge float %arg, 0.0
1154 define i1 @assume_ugt_neg1__ult_0(float %arg) {
1155 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ult_0(
1156 ; CHECK-SAME: float [[ARG:%.*]]) {
1157 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1158 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1159 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1160 ; CHECK-NEXT: ret i1 [[CMP]]
1162 %ugt.neg1 = fcmp ugt float %arg, -1.0
1163 call void @llvm.assume(i1 %ugt.neg1)
1164 %cmp = fcmp ult float %arg, 0.0
1168 define i1 @assume_ugt_neg1__ule_0(float %arg) {
1169 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ule_0(
1170 ; CHECK-SAME: float [[ARG:%.*]]) {
1171 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1172 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1173 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1174 ; CHECK-NEXT: ret i1 [[CMP]]
1176 %ugt.neg1 = fcmp ugt float %arg, -1.0
1177 call void @llvm.assume(i1 %ugt.neg1)
1178 %cmp = fcmp ule float %arg, 0.0
1182 define i1 @assume_ugt_neg1__une_0(float %arg) {
1183 ; CHECK-LABEL: define i1 @assume_ugt_neg1__une_0(
1184 ; CHECK-SAME: float [[ARG:%.*]]) {
1185 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1186 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1187 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1188 ; CHECK-NEXT: ret i1 [[CMP]]
1190 %ugt.neg1 = fcmp ugt float %arg, -1.0
1191 call void @llvm.assume(i1 %ugt.neg1)
1192 %cmp = fcmp une float %arg, 0.0
1196 define i1 @assume_ugt_neg1__uno_0(float %arg) {
1197 ; CHECK-LABEL: define i1 @assume_ugt_neg1__uno_0(
1198 ; CHECK-SAME: float [[ARG:%.*]]) {
1199 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1200 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1201 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1202 ; CHECK-NEXT: ret i1 [[CMP]]
1204 %ugt.neg1 = fcmp ugt float %arg, -1.0
1205 call void @llvm.assume(i1 %ugt.neg1)
1206 %cmp = fcmp uno float %arg, 0.0
1210 ; --------------------------------------------------------------------
1211 ; Test assume x u<= -1.0 with compares to 0
1212 ; --------------------------------------------------------------------
1214 define i1 @assume_ule_neg1__oeq_0(float %arg) {
1215 ; CHECK-LABEL: define i1 @assume_ule_neg1__oeq_0(
1216 ; CHECK-SAME: float [[ARG:%.*]]) {
1217 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1218 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1219 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1220 ; CHECK-NEXT: ret i1 [[CMP]]
1222 %ule.neg1 = fcmp ule float %arg, -1.0
1223 call void @llvm.assume(i1 %ule.neg1)
1224 %cmp = fcmp oeq float %arg, 0.0
1228 define i1 @assume_ule_neg1__ogt_0(float %arg) {
1229 ; CHECK-LABEL: define i1 @assume_ule_neg1__ogt_0(
1230 ; CHECK-SAME: float [[ARG:%.*]]) {
1231 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1232 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1233 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1234 ; CHECK-NEXT: ret i1 [[CMP]]
1236 %ule.neg1 = fcmp ule float %arg, -1.0
1237 call void @llvm.assume(i1 %ule.neg1)
1238 %cmp = fcmp ogt float %arg, 0.0
1242 define i1 @assume_ule_neg1__oge_0(float %arg) {
1243 ; CHECK-LABEL: define i1 @assume_ule_neg1__oge_0(
1244 ; CHECK-SAME: float [[ARG:%.*]]) {
1245 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1246 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1247 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1248 ; CHECK-NEXT: ret i1 [[CMP]]
1250 %ule.neg1 = fcmp ule float %arg, -1.0
1251 call void @llvm.assume(i1 %ule.neg1)
1252 %cmp = fcmp oge float %arg, 0.0
1256 define i1 @assume_ule_neg1__olt_0(float %arg) {
1257 ; CHECK-LABEL: define i1 @assume_ule_neg1__olt_0(
1258 ; CHECK-SAME: float [[ARG:%.*]]) {
1259 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1260 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1261 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1262 ; CHECK-NEXT: ret i1 [[CMP]]
1264 %ule.neg1 = fcmp ule float %arg, -1.0
1265 call void @llvm.assume(i1 %ule.neg1)
1266 %cmp = fcmp olt float %arg, 0.0
1270 define i1 @assume_ule_neg1__ole_0(float %arg) {
1271 ; CHECK-LABEL: define i1 @assume_ule_neg1__ole_0(
1272 ; CHECK-SAME: float [[ARG:%.*]]) {
1273 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1274 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1275 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1276 ; CHECK-NEXT: ret i1 [[CMP]]
1278 %ule.neg1 = fcmp ule float %arg, -1.0
1279 call void @llvm.assume(i1 %ule.neg1)
1280 %cmp = fcmp ole float %arg, 0.0
1284 define i1 @assume_ule_neg1__one_0(float %arg) {
1285 ; CHECK-LABEL: define i1 @assume_ule_neg1__one_0(
1286 ; CHECK-SAME: float [[ARG:%.*]]) {
1287 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1288 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1289 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1290 ; CHECK-NEXT: ret i1 [[CMP]]
1292 %ule.neg1 = fcmp ule float %arg, -1.0
1293 call void @llvm.assume(i1 %ule.neg1)
1294 %cmp = fcmp one float %arg, 0.0
1298 define i1 @assume_ule_neg1__ord_0(float %arg) {
1299 ; CHECK-LABEL: define i1 @assume_ule_neg1__ord_0(
1300 ; CHECK-SAME: float [[ARG:%.*]]) {
1301 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1302 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1303 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1304 ; CHECK-NEXT: ret i1 [[CMP]]
1306 %ule.neg1 = fcmp ule float %arg, -1.0
1307 call void @llvm.assume(i1 %ule.neg1)
1308 %cmp = fcmp ord float %arg, 0.0
1312 define i1 @assume_ule_neg1__ueq_0(float %arg) {
1313 ; CHECK-LABEL: define i1 @assume_ule_neg1__ueq_0(
1314 ; CHECK-SAME: float [[ARG:%.*]]) {
1315 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1316 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1317 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1318 ; CHECK-NEXT: ret i1 [[CMP]]
1320 %ule.neg1 = fcmp ule float %arg, -1.0
1321 call void @llvm.assume(i1 %ule.neg1)
1322 %cmp = fcmp ueq float %arg, 0.0
1326 define i1 @assume_ule_neg1__ugt_0(float %arg) {
1327 ; CHECK-LABEL: define i1 @assume_ule_neg1__ugt_0(
1328 ; CHECK-SAME: float [[ARG:%.*]]) {
1329 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1330 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1331 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1332 ; CHECK-NEXT: ret i1 [[CMP]]
1334 %ule.neg1 = fcmp ule float %arg, -1.0
1335 call void @llvm.assume(i1 %ule.neg1)
1336 %cmp = fcmp ugt float %arg, 0.0
1340 define i1 @assume_ule_neg1__uge_0(float %arg) {
1341 ; CHECK-LABEL: define i1 @assume_ule_neg1__uge_0(
1342 ; CHECK-SAME: float [[ARG:%.*]]) {
1343 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1344 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1345 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1346 ; CHECK-NEXT: ret i1 [[CMP]]
1348 %ule.neg1 = fcmp ule float %arg, -1.0
1349 call void @llvm.assume(i1 %ule.neg1)
1350 %cmp = fcmp uge float %arg, 0.0
1354 define i1 @assume_ule_neg1__ult_0(float %arg) {
1355 ; CHECK-LABEL: define i1 @assume_ule_neg1__ult_0(
1356 ; CHECK-SAME: float [[ARG:%.*]]) {
1357 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1358 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1359 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1360 ; CHECK-NEXT: ret i1 [[CMP]]
1362 %ule.neg1 = fcmp ule float %arg, -1.0
1363 call void @llvm.assume(i1 %ule.neg1)
1364 %cmp = fcmp ult float %arg, 0.0
1368 define i1 @assume_ule_neg1__ule_0(float %arg) {
1369 ; CHECK-LABEL: define i1 @assume_ule_neg1__ule_0(
1370 ; CHECK-SAME: float [[ARG:%.*]]) {
1371 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1372 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1373 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1374 ; CHECK-NEXT: ret i1 [[CMP]]
1376 %ule.neg1 = fcmp ule float %arg, -1.0
1377 call void @llvm.assume(i1 %ule.neg1)
1378 %cmp = fcmp ule float %arg, 0.0
1382 define i1 @assume_ule_neg1__une_0(float %arg) {
1383 ; CHECK-LABEL: define i1 @assume_ule_neg1__une_0(
1384 ; CHECK-SAME: float [[ARG:%.*]]) {
1385 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1386 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1387 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1388 ; CHECK-NEXT: ret i1 [[CMP]]
1390 %ule.neg1 = fcmp ule float %arg, -1.0
1391 call void @llvm.assume(i1 %ule.neg1)
1392 %cmp = fcmp une float %arg, 0.0
1396 define i1 @assume_ule_neg1__uno_0(float %arg) {
1397 ; CHECK-LABEL: define i1 @assume_ule_neg1__uno_0(
1398 ; CHECK-SAME: float [[ARG:%.*]]) {
1399 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1400 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1401 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1402 ; CHECK-NEXT: ret i1 [[CMP]]
1404 %ule.neg1 = fcmp ule float %arg, -1.0
1405 call void @llvm.assume(i1 %ule.neg1)
1406 %cmp = fcmp uno float %arg, 0.0
1410 ; --------------------------------------------------------------------
1411 ; Test assume x u< -1.0 with compares to 0
1412 ; --------------------------------------------------------------------
1414 define i1 @assume_ult_neg1__oeq_0(float %arg) {
1415 ; CHECK-LABEL: define i1 @assume_ult_neg1__oeq_0(
1416 ; CHECK-SAME: float [[ARG:%.*]]) {
1417 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1418 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1419 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1420 ; CHECK-NEXT: ret i1 [[CMP]]
1422 %ult.neg1 = fcmp ult float %arg, -1.0
1423 call void @llvm.assume(i1 %ult.neg1)
1424 %cmp = fcmp oeq float %arg, 0.0
1428 define i1 @assume_ult_neg1__ogt_0(float %arg) {
1429 ; CHECK-LABEL: define i1 @assume_ult_neg1__ogt_0(
1430 ; CHECK-SAME: float [[ARG:%.*]]) {
1431 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1432 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1433 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1434 ; CHECK-NEXT: ret i1 [[CMP]]
1436 %ult.neg1 = fcmp ult float %arg, -1.0
1437 call void @llvm.assume(i1 %ult.neg1)
1438 %cmp = fcmp ogt float %arg, 0.0
1442 define i1 @assume_ult_neg1__oge_0(float %arg) {
1443 ; CHECK-LABEL: define i1 @assume_ult_neg1__oge_0(
1444 ; CHECK-SAME: float [[ARG:%.*]]) {
1445 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1446 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1447 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1448 ; CHECK-NEXT: ret i1 [[CMP]]
1450 %ult.neg1 = fcmp ult float %arg, -1.0
1451 call void @llvm.assume(i1 %ult.neg1)
1452 %cmp = fcmp oge float %arg, 0.0
1456 define i1 @assume_ult_neg1__olt_0(float %arg) {
1457 ; CHECK-LABEL: define i1 @assume_ult_neg1__olt_0(
1458 ; CHECK-SAME: float [[ARG:%.*]]) {
1459 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1460 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1461 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1462 ; CHECK-NEXT: ret i1 [[CMP]]
1464 %ult.neg1 = fcmp ult float %arg, -1.0
1465 call void @llvm.assume(i1 %ult.neg1)
1466 %cmp = fcmp olt float %arg, 0.0
1470 define i1 @assume_ult_neg1__ole_0(float %arg) {
1471 ; CHECK-LABEL: define i1 @assume_ult_neg1__ole_0(
1472 ; CHECK-SAME: float [[ARG:%.*]]) {
1473 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1474 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1475 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1476 ; CHECK-NEXT: ret i1 [[CMP]]
1478 %ult.neg1 = fcmp ult float %arg, -1.0
1479 call void @llvm.assume(i1 %ult.neg1)
1480 %cmp = fcmp ole float %arg, 0.0
1484 define i1 @assume_ult_neg1__one_0(float %arg) {
1485 ; CHECK-LABEL: define i1 @assume_ult_neg1__one_0(
1486 ; CHECK-SAME: float [[ARG:%.*]]) {
1487 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1488 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1489 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1490 ; CHECK-NEXT: ret i1 [[CMP]]
1492 %ult.neg1 = fcmp ult float %arg, -1.0
1493 call void @llvm.assume(i1 %ult.neg1)
1494 %cmp = fcmp one float %arg, 0.0
1498 define i1 @assume_ult_neg1__ord_0(float %arg) {
1499 ; CHECK-LABEL: define i1 @assume_ult_neg1__ord_0(
1500 ; CHECK-SAME: float [[ARG:%.*]]) {
1501 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1502 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1503 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1504 ; CHECK-NEXT: ret i1 [[CMP]]
1506 %ult.neg1 = fcmp ult float %arg, -1.0
1507 call void @llvm.assume(i1 %ult.neg1)
1508 %cmp = fcmp ord float %arg, 0.0
1512 define i1 @assume_ult_neg1__ueq_0(float %arg) {
1513 ; CHECK-LABEL: define i1 @assume_ult_neg1__ueq_0(
1514 ; CHECK-SAME: float [[ARG:%.*]]) {
1515 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1516 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1517 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1518 ; CHECK-NEXT: ret i1 [[CMP]]
1520 %ult.neg1 = fcmp ult float %arg, -1.0
1521 call void @llvm.assume(i1 %ult.neg1)
1522 %cmp = fcmp ueq float %arg, 0.0
1526 define i1 @assume_ult_neg1__ugt_0(float %arg) {
1527 ; CHECK-LABEL: define i1 @assume_ult_neg1__ugt_0(
1528 ; CHECK-SAME: float [[ARG:%.*]]) {
1529 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1530 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1531 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1532 ; CHECK-NEXT: ret i1 [[CMP]]
1534 %ult.neg1 = fcmp ult float %arg, -1.0
1535 call void @llvm.assume(i1 %ult.neg1)
1536 %cmp = fcmp ugt float %arg, 0.0
1540 define i1 @assume_ult_neg1__uge_0(float %arg) {
1541 ; CHECK-LABEL: define i1 @assume_ult_neg1__uge_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: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1546 ; CHECK-NEXT: ret i1 [[CMP]]
1548 %ult.neg1 = fcmp ult float %arg, -1.0
1549 call void @llvm.assume(i1 %ult.neg1)
1550 %cmp = fcmp uge float %arg, 0.0
1554 define i1 @assume_ult_neg1__ult_0(float %arg) {
1555 ; CHECK-LABEL: define i1 @assume_ult_neg1__ult_0(
1556 ; CHECK-SAME: float [[ARG:%.*]]) {
1557 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1558 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1559 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1560 ; CHECK-NEXT: ret i1 [[CMP]]
1562 %ult.neg1 = fcmp ult float %arg, -1.0
1563 call void @llvm.assume(i1 %ult.neg1)
1564 %cmp = fcmp ult float %arg, 0.0
1568 define i1 @assume_ult_neg1__ule_0(float %arg) {
1569 ; CHECK-LABEL: define i1 @assume_ult_neg1__ule_0(
1570 ; CHECK-SAME: float [[ARG:%.*]]) {
1571 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1572 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1573 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1574 ; CHECK-NEXT: ret i1 [[CMP]]
1576 %ult.neg1 = fcmp ult float %arg, -1.0
1577 call void @llvm.assume(i1 %ult.neg1)
1578 %cmp = fcmp ule float %arg, 0.0
1582 define i1 @assume_ult_neg1__une_0(float %arg) {
1583 ; CHECK-LABEL: define i1 @assume_ult_neg1__une_0(
1584 ; CHECK-SAME: float [[ARG:%.*]]) {
1585 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1586 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1587 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1588 ; CHECK-NEXT: ret i1 [[CMP]]
1590 %ult.neg1 = fcmp ult float %arg, -1.0
1591 call void @llvm.assume(i1 %ult.neg1)
1592 %cmp = fcmp une float %arg, 0.0
1596 define i1 @assume_ult_neg1__uno_0(float %arg) {
1597 ; CHECK-LABEL: define i1 @assume_ult_neg1__uno_0(
1598 ; CHECK-SAME: float [[ARG:%.*]]) {
1599 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1600 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1601 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1602 ; CHECK-NEXT: ret i1 [[CMP]]
1604 %ult.neg1 = fcmp ult float %arg, -1.0
1605 call void @llvm.assume(i1 %ult.neg1)
1606 %cmp = fcmp uno float %arg, 0.0
1610 ; --------------------------------------------------------------------
1611 ; Test assume x == 0 with compares to 0
1612 ; --------------------------------------------------------------------
1614 define i1 @assume_oeq_0__oeq_0(float %arg) {
1615 ; CHECK-LABEL: define i1 @assume_oeq_0__oeq_0(
1616 ; CHECK-SAME: float [[ARG:%.*]]) {
1617 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1618 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1619 ; CHECK-NEXT: ret i1 true
1621 %oeq.0 = fcmp oeq float %arg, 0.0
1622 call void @llvm.assume(i1 %oeq.0)
1623 %cmp = fcmp oeq float %arg, 0.0
1627 define i1 @assume_oeq_0__ueq_0(float %arg) {
1628 ; CHECK-LABEL: define i1 @assume_oeq_0__ueq_0(
1629 ; CHECK-SAME: float [[ARG:%.*]]) {
1630 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1631 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1632 ; CHECK-NEXT: ret i1 true
1634 %oeq.0 = fcmp oeq float %arg, 0.0
1635 call void @llvm.assume(i1 %oeq.0)
1636 %cmp = fcmp ueq float %arg, 0.0
1640 define i1 @assume_one_0__oeq_0(float %arg) {
1641 ; CHECK-LABEL: define i1 @assume_one_0__oeq_0(
1642 ; CHECK-SAME: float [[ARG:%.*]]) {
1643 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1644 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1645 ; CHECK-NEXT: ret i1 false
1647 %oeq.0 = fcmp one float %arg, 0.0
1648 call void @llvm.assume(i1 %oeq.0)
1649 %cmp = fcmp oeq float %arg, 0.0
1653 define i1 @assume_ueq_0__oeq_0(float %arg) {
1654 ; CHECK-LABEL: define i1 @assume_ueq_0__oeq_0(
1655 ; CHECK-SAME: float [[ARG:%.*]]) {
1656 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1657 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1658 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1659 ; CHECK-NEXT: ret i1 [[CMP]]
1661 %oeq.0 = fcmp ueq float %arg, 0.0
1662 call void @llvm.assume(i1 %oeq.0)
1663 %cmp = fcmp oeq float %arg, 0.0
1667 define i1 @assume_ueq_0__ueq_0(float %arg) {
1668 ; CHECK-LABEL: define i1 @assume_ueq_0__ueq_0(
1669 ; CHECK-SAME: float [[ARG:%.*]]) {
1670 ; CHECK-NEXT: [[UEQ_0:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1671 ; CHECK-NEXT: call void @llvm.assume(i1 [[UEQ_0]])
1672 ; CHECK-NEXT: ret i1 true
1674 %ueq.0 = fcmp ueq float %arg, 0.0
1675 call void @llvm.assume(i1 %ueq.0)
1676 %cmp = fcmp ueq float %arg, 0.0
1680 define i1 @assume_one_0__ueq_0(float %arg) {
1681 ; CHECK-LABEL: define i1 @assume_one_0__ueq_0(
1682 ; CHECK-SAME: float [[ARG:%.*]]) {
1683 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1684 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1685 ; CHECK-NEXT: ret i1 false
1687 %one.0 = fcmp one float %arg, 0.0
1688 call void @llvm.assume(i1 %one.0)
1689 %cmp = fcmp ueq float %arg, 0.0
1693 define i1 @assume_one_0__one_0(float %arg) {
1694 ; CHECK-LABEL: define i1 @assume_one_0__one_0(
1695 ; CHECK-SAME: float [[ARG:%.*]]) {
1696 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1697 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1698 ; CHECK-NEXT: ret i1 true
1700 %one.0 = fcmp one float %arg, 0.0
1701 call void @llvm.assume(i1 %one.0)
1702 %cmp = fcmp one float %arg, 0.0
1706 define i1 @assume_une_0__oeq_0(float %arg) {
1707 ; CHECK-LABEL: define i1 @assume_une_0__oeq_0(
1708 ; CHECK-SAME: float [[ARG:%.*]]) {
1709 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1710 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1711 ; CHECK-NEXT: ret i1 false
1713 %one.0 = fcmp une float %arg, 0.0
1714 call void @llvm.assume(i1 %one.0)
1715 %cmp = fcmp oeq float %arg, 0.0
1719 define i1 @assume_une_0__one_0(float %arg) {
1720 ; CHECK-LABEL: define i1 @assume_une_0__one_0(
1721 ; CHECK-SAME: float [[ARG:%.*]]) {
1722 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1723 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1724 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1725 ; CHECK-NEXT: ret i1 [[CMP]]
1727 %one.0 = fcmp une float %arg, 0.0
1728 call void @llvm.assume(i1 %one.0)
1729 %cmp = fcmp one float %arg, 0.0
1733 ; --------------------------------------------------------------------
1734 ; Test assume x < 1.0 with compares to 0
1735 ; --------------------------------------------------------------------
1737 define i1 @assume_olt_pos1__oeq_0(float %arg) {
1738 ; CHECK-LABEL: define i1 @assume_olt_pos1__oeq_0(
1739 ; CHECK-SAME: float [[ARG:%.*]]) {
1740 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1741 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1742 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1743 ; CHECK-NEXT: ret i1 [[CMP]]
1745 %olt.pos1 = fcmp olt float %arg, 1.0
1746 call void @llvm.assume(i1 %olt.pos1)
1747 %cmp = fcmp oeq float %arg, 0.0
1751 define i1 @assume_olt_pos1__ogt_0(float %arg) {
1752 ; CHECK-LABEL: define i1 @assume_olt_pos1__ogt_0(
1753 ; CHECK-SAME: float [[ARG:%.*]]) {
1754 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1755 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1756 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1757 ; CHECK-NEXT: ret i1 [[CMP]]
1759 %olt.pos1 = fcmp olt float %arg, 1.0
1760 call void @llvm.assume(i1 %olt.pos1)
1761 %cmp = fcmp ogt float %arg, 0.0
1765 define i1 @assume_olt_pos1__oge_0(float %arg) {
1766 ; CHECK-LABEL: define i1 @assume_olt_pos1__oge_0(
1767 ; CHECK-SAME: float [[ARG:%.*]]) {
1768 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1769 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1770 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1771 ; CHECK-NEXT: ret i1 [[CMP]]
1773 %olt.pos1 = fcmp olt float %arg, 1.0
1774 call void @llvm.assume(i1 %olt.pos1)
1775 %cmp = fcmp oge float %arg, 0.0
1779 define i1 @assume_olt_pos1__olt_0(float %arg) {
1780 ; CHECK-LABEL: define i1 @assume_olt_pos1__olt_0(
1781 ; CHECK-SAME: float [[ARG:%.*]]) {
1782 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1783 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1784 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1785 ; CHECK-NEXT: ret i1 [[CMP]]
1787 %olt.pos1 = fcmp olt float %arg, 1.0
1788 call void @llvm.assume(i1 %olt.pos1)
1789 %cmp = fcmp olt float %arg, 0.0
1793 define i1 @assume_olt_pos1__ole_0(float %arg) {
1794 ; CHECK-LABEL: define i1 @assume_olt_pos1__ole_0(
1795 ; CHECK-SAME: float [[ARG:%.*]]) {
1796 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1797 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1798 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1799 ; CHECK-NEXT: ret i1 [[CMP]]
1801 %olt.pos1 = fcmp olt float %arg, 1.0
1802 call void @llvm.assume(i1 %olt.pos1)
1803 %cmp = fcmp ole float %arg, 0.0
1807 define i1 @assume_olt_pos1__one_0(float %arg) {
1808 ; CHECK-LABEL: define i1 @assume_olt_pos1__one_0(
1809 ; CHECK-SAME: float [[ARG:%.*]]) {
1810 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1811 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1812 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1813 ; CHECK-NEXT: ret i1 [[CMP]]
1815 %olt.pos1 = fcmp olt float %arg, 1.0
1816 call void @llvm.assume(i1 %olt.pos1)
1817 %cmp = fcmp one float %arg, 0.0
1821 define i1 @assume_olt_pos1__ord_0(float %arg) {
1822 ; CHECK-LABEL: define i1 @assume_olt_pos1__ord_0(
1823 ; CHECK-SAME: float [[ARG:%.*]]) {
1824 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1825 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1826 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1827 ; CHECK-NEXT: ret i1 [[CMP]]
1829 %olt.pos1 = fcmp olt float %arg, 1.0
1830 call void @llvm.assume(i1 %olt.pos1)
1831 %cmp = fcmp ord float %arg, 0.0
1835 define i1 @assume_olt_pos1__ueq_0(float %arg) {
1836 ; CHECK-LABEL: define i1 @assume_olt_pos1__ueq_0(
1837 ; CHECK-SAME: float [[ARG:%.*]]) {
1838 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1839 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1840 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1841 ; CHECK-NEXT: ret i1 [[CMP]]
1843 %olt.pos1 = fcmp olt float %arg, 1.0
1844 call void @llvm.assume(i1 %olt.pos1)
1845 %cmp = fcmp ueq float %arg, 0.0
1849 define i1 @assume_olt_pos1__ugt_0(float %arg) {
1850 ; CHECK-LABEL: define i1 @assume_olt_pos1__ugt_0(
1851 ; CHECK-SAME: float [[ARG:%.*]]) {
1852 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1853 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1854 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1855 ; CHECK-NEXT: ret i1 [[CMP]]
1857 %olt.pos1 = fcmp olt float %arg, 1.0
1858 call void @llvm.assume(i1 %olt.pos1)
1859 %cmp = fcmp ugt float %arg, 0.0
1863 define i1 @assume_olt_pos1__uge_0(float %arg) {
1864 ; CHECK-LABEL: define i1 @assume_olt_pos1__uge_0(
1865 ; CHECK-SAME: float [[ARG:%.*]]) {
1866 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1867 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1868 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1869 ; CHECK-NEXT: ret i1 [[CMP]]
1871 %olt.pos1 = fcmp olt float %arg, 1.0
1872 call void @llvm.assume(i1 %olt.pos1)
1873 %cmp = fcmp uge float %arg, 0.0
1877 define i1 @assume_olt_pos1__ult_0(float %arg) {
1878 ; CHECK-LABEL: define i1 @assume_olt_pos1__ult_0(
1879 ; CHECK-SAME: float [[ARG:%.*]]) {
1880 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1881 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1882 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1883 ; CHECK-NEXT: ret i1 [[CMP]]
1885 %olt.pos1 = fcmp olt float %arg, 1.0
1886 call void @llvm.assume(i1 %olt.pos1)
1887 %cmp = fcmp ult float %arg, 0.0
1891 define i1 @assume_olt_pos1__ule_0(float %arg) {
1892 ; CHECK-LABEL: define i1 @assume_olt_pos1__ule_0(
1893 ; CHECK-SAME: float [[ARG:%.*]]) {
1894 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1895 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1896 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1897 ; CHECK-NEXT: ret i1 [[CMP]]
1899 %olt.pos1 = fcmp olt float %arg, 1.0
1900 call void @llvm.assume(i1 %olt.pos1)
1901 %cmp = fcmp ule float %arg, 0.0
1905 define i1 @assume_olt_pos1__une_0(float %arg) {
1906 ; CHECK-LABEL: define i1 @assume_olt_pos1__une_0(
1907 ; CHECK-SAME: float [[ARG:%.*]]) {
1908 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1909 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1910 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1911 ; CHECK-NEXT: ret i1 [[CMP]]
1913 %olt.pos1 = fcmp olt float %arg, 1.0
1914 call void @llvm.assume(i1 %olt.pos1)
1915 %cmp = fcmp une float %arg, 0.0
1919 define i1 @assume_olt_pos1__uno_0(float %arg) {
1920 ; CHECK-LABEL: define i1 @assume_olt_pos1__uno_0(
1921 ; CHECK-SAME: float [[ARG:%.*]]) {
1922 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1923 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1924 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1925 ; CHECK-NEXT: ret i1 [[CMP]]
1927 %olt.pos1 = fcmp olt float %arg, 1.0
1928 call void @llvm.assume(i1 %olt.pos1)
1929 %cmp = fcmp uno float %arg, 0.0
1933 ; --------------------------------------------------------------------
1934 ; Test assume x <= 1.0 with compares to 0
1935 ; --------------------------------------------------------------------
1937 define i1 @assume_ole_pos1__oeq_0(float %arg) {
1938 ; CHECK-LABEL: define i1 @assume_ole_pos1__oeq_0(
1939 ; CHECK-SAME: float [[ARG:%.*]]) {
1940 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1941 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1942 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1943 ; CHECK-NEXT: ret i1 [[CMP]]
1945 %ole.pos1 = fcmp ole float %arg, 1.0
1946 call void @llvm.assume(i1 %ole.pos1)
1947 %cmp = fcmp oeq float %arg, 0.0
1951 define i1 @assume_ole_pos1__ogt_0(float %arg) {
1952 ; CHECK-LABEL: define i1 @assume_ole_pos1__ogt_0(
1953 ; CHECK-SAME: float [[ARG:%.*]]) {
1954 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1955 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1956 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1957 ; CHECK-NEXT: ret i1 [[CMP]]
1959 %ole.pos1 = fcmp ole float %arg, 1.0
1960 call void @llvm.assume(i1 %ole.pos1)
1961 %cmp = fcmp ogt float %arg, 0.0
1965 define i1 @assume_ole_pos1__oge_0(float %arg) {
1966 ; CHECK-LABEL: define i1 @assume_ole_pos1__oge_0(
1967 ; CHECK-SAME: float [[ARG:%.*]]) {
1968 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1969 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1970 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1971 ; CHECK-NEXT: ret i1 [[CMP]]
1973 %ole.pos1 = fcmp ole float %arg, 1.0
1974 call void @llvm.assume(i1 %ole.pos1)
1975 %cmp = fcmp oge float %arg, 0.0
1979 define i1 @assume_ole_pos1__olt_0(float %arg) {
1980 ; CHECK-LABEL: define i1 @assume_ole_pos1__olt_0(
1981 ; CHECK-SAME: float [[ARG:%.*]]) {
1982 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1983 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1984 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1985 ; CHECK-NEXT: ret i1 [[CMP]]
1987 %ole.pos1 = fcmp ole float %arg, 1.0
1988 call void @llvm.assume(i1 %ole.pos1)
1989 %cmp = fcmp olt float %arg, 0.0
1993 define i1 @assume_ole_pos1__ole_0(float %arg) {
1994 ; CHECK-LABEL: define i1 @assume_ole_pos1__ole_0(
1995 ; CHECK-SAME: float [[ARG:%.*]]) {
1996 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1997 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1998 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1999 ; CHECK-NEXT: ret i1 [[CMP]]
2001 %ole.pos1 = fcmp ole float %arg, 1.0
2002 call void @llvm.assume(i1 %ole.pos1)
2003 %cmp = fcmp ole float %arg, 0.0
2007 define i1 @assume_ole_pos1__one_0(float %arg) {
2008 ; CHECK-LABEL: define i1 @assume_ole_pos1__one_0(
2009 ; CHECK-SAME: float [[ARG:%.*]]) {
2010 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2011 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2012 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2013 ; CHECK-NEXT: ret i1 [[CMP]]
2015 %ole.pos1 = fcmp ole float %arg, 1.0
2016 call void @llvm.assume(i1 %ole.pos1)
2017 %cmp = fcmp one float %arg, 0.0
2021 define i1 @assume_ole_pos1__ord_0(float %arg) {
2022 ; CHECK-LABEL: define i1 @assume_ole_pos1__ord_0(
2023 ; CHECK-SAME: float [[ARG:%.*]]) {
2024 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2025 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2026 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2027 ; CHECK-NEXT: ret i1 [[CMP]]
2029 %ole.pos1 = fcmp ole float %arg, 1.0
2030 call void @llvm.assume(i1 %ole.pos1)
2031 %cmp = fcmp ord float %arg, 0.0
2035 define i1 @assume_ole_pos1__ueq_0(float %arg) {
2036 ; CHECK-LABEL: define i1 @assume_ole_pos1__ueq_0(
2037 ; CHECK-SAME: float [[ARG:%.*]]) {
2038 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2039 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2040 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2041 ; CHECK-NEXT: ret i1 [[CMP]]
2043 %ole.pos1 = fcmp ole float %arg, 1.0
2044 call void @llvm.assume(i1 %ole.pos1)
2045 %cmp = fcmp ueq float %arg, 0.0
2049 define i1 @assume_ole_pos1__ugt_0(float %arg) {
2050 ; CHECK-LABEL: define i1 @assume_ole_pos1__ugt_0(
2051 ; CHECK-SAME: float [[ARG:%.*]]) {
2052 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2053 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2054 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2055 ; CHECK-NEXT: ret i1 [[CMP]]
2057 %ole.pos1 = fcmp ole float %arg, 1.0
2058 call void @llvm.assume(i1 %ole.pos1)
2059 %cmp = fcmp ugt float %arg, 0.0
2063 define i1 @assume_ole_pos1__uge_0(float %arg) {
2064 ; CHECK-LABEL: define i1 @assume_ole_pos1__uge_0(
2065 ; CHECK-SAME: float [[ARG:%.*]]) {
2066 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2067 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2068 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2069 ; CHECK-NEXT: ret i1 [[CMP]]
2071 %ole.pos1 = fcmp ole float %arg, 1.0
2072 call void @llvm.assume(i1 %ole.pos1)
2073 %cmp = fcmp uge float %arg, 0.0
2077 define i1 @assume_ole_pos1__ult_0(float %arg) {
2078 ; CHECK-LABEL: define i1 @assume_ole_pos1__ult_0(
2079 ; CHECK-SAME: float [[ARG:%.*]]) {
2080 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2081 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2082 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2083 ; CHECK-NEXT: ret i1 [[CMP]]
2085 %ole.pos1 = fcmp ole float %arg, 1.0
2086 call void @llvm.assume(i1 %ole.pos1)
2087 %cmp = fcmp ult float %arg, 0.0
2091 define i1 @assume_ole_pos1__ule_0(float %arg) {
2092 ; CHECK-LABEL: define i1 @assume_ole_pos1__ule_0(
2093 ; CHECK-SAME: float [[ARG:%.*]]) {
2094 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2095 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2096 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2097 ; CHECK-NEXT: ret i1 [[CMP]]
2099 %ole.pos1 = fcmp ole float %arg, 1.0
2100 call void @llvm.assume(i1 %ole.pos1)
2101 %cmp = fcmp ule float %arg, 0.0
2105 define i1 @assume_ole_pos1__une_0(float %arg) {
2106 ; CHECK-LABEL: define i1 @assume_ole_pos1__une_0(
2107 ; CHECK-SAME: float [[ARG:%.*]]) {
2108 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2109 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2110 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2111 ; CHECK-NEXT: ret i1 [[CMP]]
2113 %ole.pos1 = fcmp ole float %arg, 1.0
2114 call void @llvm.assume(i1 %ole.pos1)
2115 %cmp = fcmp une float %arg, 0.0
2119 define i1 @assume_ole_pos1__uno_0(float %arg) {
2120 ; CHECK-LABEL: define i1 @assume_ole_pos1__uno_0(
2121 ; CHECK-SAME: float [[ARG:%.*]]) {
2122 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2123 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2124 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2125 ; CHECK-NEXT: ret i1 [[CMP]]
2127 %ole.pos1 = fcmp ole float %arg, 1.0
2128 call void @llvm.assume(i1 %ole.pos1)
2129 %cmp = fcmp uno float %arg, 0.0
2133 ; --------------------------------------------------------------------
2134 ; Test assume x > 1.0 with compares to 0
2135 ; --------------------------------------------------------------------
2137 define i1 @assume_ogt_pos1__oeq_0(float %arg) {
2138 ; CHECK-LABEL: define i1 @assume_ogt_pos1__oeq_0(
2139 ; CHECK-SAME: float [[ARG:%.*]]) {
2140 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2141 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2142 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2143 ; CHECK-NEXT: ret i1 [[CMP]]
2145 %ogt.pos1 = fcmp ogt float %arg, 1.0
2146 call void @llvm.assume(i1 %ogt.pos1)
2147 %cmp = fcmp oeq float %arg, 0.0
2151 define i1 @assume_ogt_pos1__ogt_0(float %arg) {
2152 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ogt_0(
2153 ; CHECK-SAME: float [[ARG:%.*]]) {
2154 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2155 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2156 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2157 ; CHECK-NEXT: ret i1 [[CMP]]
2159 %ogt.pos1 = fcmp ogt float %arg, 1.0
2160 call void @llvm.assume(i1 %ogt.pos1)
2161 %cmp = fcmp ogt float %arg, 0.0
2165 define i1 @assume_ogt_pos1__oge_0(float %arg) {
2166 ; CHECK-LABEL: define i1 @assume_ogt_pos1__oge_0(
2167 ; CHECK-SAME: float [[ARG:%.*]]) {
2168 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2169 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2170 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2171 ; CHECK-NEXT: ret i1 [[CMP]]
2173 %ogt.pos1 = fcmp ogt float %arg, 1.0
2174 call void @llvm.assume(i1 %ogt.pos1)
2175 %cmp = fcmp oge float %arg, 0.0
2179 define i1 @assume_ogt_pos1__olt_0(float %arg) {
2180 ; CHECK-LABEL: define i1 @assume_ogt_pos1__olt_0(
2181 ; CHECK-SAME: float [[ARG:%.*]]) {
2182 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2183 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2184 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2185 ; CHECK-NEXT: ret i1 [[CMP]]
2187 %ogt.pos1 = fcmp ogt float %arg, 1.0
2188 call void @llvm.assume(i1 %ogt.pos1)
2189 %cmp = fcmp olt float %arg, 0.0
2193 define i1 @assume_ogt_pos1__ole_0(float %arg) {
2194 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ole_0(
2195 ; CHECK-SAME: float [[ARG:%.*]]) {
2196 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2197 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2198 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2199 ; CHECK-NEXT: ret i1 [[CMP]]
2201 %ogt.pos1 = fcmp ogt float %arg, 1.0
2202 call void @llvm.assume(i1 %ogt.pos1)
2203 %cmp = fcmp ole float %arg, 0.0
2207 define i1 @assume_ogt_pos1__one_0(float %arg) {
2208 ; CHECK-LABEL: define i1 @assume_ogt_pos1__one_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: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2213 ; CHECK-NEXT: ret i1 [[CMP]]
2215 %ogt.pos1 = fcmp ogt float %arg, 1.0
2216 call void @llvm.assume(i1 %ogt.pos1)
2217 %cmp = fcmp one float %arg, 0.0
2221 define i1 @assume_ogt_pos1__ord_0(float %arg) {
2222 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ord_0(
2223 ; CHECK-SAME: float [[ARG:%.*]]) {
2224 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2225 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2226 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2227 ; CHECK-NEXT: ret i1 [[CMP]]
2229 %ogt.pos1 = fcmp ogt float %arg, 1.0
2230 call void @llvm.assume(i1 %ogt.pos1)
2231 %cmp = fcmp ord float %arg, 0.0
2235 define i1 @assume_ogt_pos1__ueq_0(float %arg) {
2236 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ueq_0(
2237 ; CHECK-SAME: float [[ARG:%.*]]) {
2238 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2239 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2240 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2241 ; CHECK-NEXT: ret i1 [[CMP]]
2243 %ogt.pos1 = fcmp ogt float %arg, 1.0
2244 call void @llvm.assume(i1 %ogt.pos1)
2245 %cmp = fcmp ueq float %arg, 0.0
2249 define i1 @assume_ogt_pos1__ugt_0(float %arg) {
2250 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ugt_0(
2251 ; CHECK-SAME: float [[ARG:%.*]]) {
2252 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2253 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2254 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2255 ; CHECK-NEXT: ret i1 [[CMP]]
2257 %ogt.pos1 = fcmp ogt float %arg, 1.0
2258 call void @llvm.assume(i1 %ogt.pos1)
2259 %cmp = fcmp ugt float %arg, 0.0
2263 define i1 @assume_ogt_pos1__uge_0(float %arg) {
2264 ; CHECK-LABEL: define i1 @assume_ogt_pos1__uge_0(
2265 ; CHECK-SAME: float [[ARG:%.*]]) {
2266 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2267 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2268 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2269 ; CHECK-NEXT: ret i1 [[CMP]]
2271 %ogt.pos1 = fcmp ogt float %arg, 1.0
2272 call void @llvm.assume(i1 %ogt.pos1)
2273 %cmp = fcmp uge float %arg, 0.0
2277 define i1 @assume_ogt_pos1__ult_0(float %arg) {
2278 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ult_0(
2279 ; CHECK-SAME: float [[ARG:%.*]]) {
2280 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2281 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2282 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2283 ; CHECK-NEXT: ret i1 [[CMP]]
2285 %ogt.pos1 = fcmp ogt float %arg, 1.0
2286 call void @llvm.assume(i1 %ogt.pos1)
2287 %cmp = fcmp ult float %arg, 0.0
2291 define i1 @assume_ogt_pos1__ule_0(float %arg) {
2292 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ule_0(
2293 ; CHECK-SAME: float [[ARG:%.*]]) {
2294 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2295 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2296 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2297 ; CHECK-NEXT: ret i1 [[CMP]]
2299 %ogt.pos1 = fcmp ogt float %arg, 1.0
2300 call void @llvm.assume(i1 %ogt.pos1)
2301 %cmp = fcmp ule float %arg, 0.0
2305 define i1 @assume_ogt_pos1__une_0(float %arg) {
2306 ; CHECK-LABEL: define i1 @assume_ogt_pos1__une_0(
2307 ; CHECK-SAME: float [[ARG:%.*]]) {
2308 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2309 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2310 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2311 ; CHECK-NEXT: ret i1 [[CMP]]
2313 %ogt.pos1 = fcmp ogt float %arg, 1.0
2314 call void @llvm.assume(i1 %ogt.pos1)
2315 %cmp = fcmp une float %arg, 0.0
2319 define i1 @assume_ogt_pos1__uno_0(float %arg) {
2320 ; CHECK-LABEL: define i1 @assume_ogt_pos1__uno_0(
2321 ; CHECK-SAME: float [[ARG:%.*]]) {
2322 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2323 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2324 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2325 ; CHECK-NEXT: ret i1 [[CMP]]
2327 %ogt.pos1 = fcmp ogt float %arg, 1.0
2328 call void @llvm.assume(i1 %ogt.pos1)
2329 %cmp = fcmp uno float %arg, 0.0
2333 ; --------------------------------------------------------------------
2334 ; Test assume x >= 1.0 with compares to 0
2335 ; --------------------------------------------------------------------
2337 define i1 @assume_oge_pos1__oeq_0(float %arg) {
2338 ; CHECK-LABEL: define i1 @assume_oge_pos1__oeq_0(
2339 ; CHECK-SAME: float [[ARG:%.*]]) {
2340 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2341 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2342 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2343 ; CHECK-NEXT: ret i1 [[CMP]]
2345 %oge.pos1 = fcmp oge float %arg, 1.0
2346 call void @llvm.assume(i1 %oge.pos1)
2347 %cmp = fcmp oeq float %arg, 0.0
2351 define i1 @assume_oge_pos1__ogt_0(float %arg) {
2352 ; CHECK-LABEL: define i1 @assume_oge_pos1__ogt_0(
2353 ; CHECK-SAME: float [[ARG:%.*]]) {
2354 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2355 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2356 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2357 ; CHECK-NEXT: ret i1 [[CMP]]
2359 %oge.pos1 = fcmp oge float %arg, 1.0
2360 call void @llvm.assume(i1 %oge.pos1)
2361 %cmp = fcmp ogt float %arg, 0.0
2365 define i1 @assume_oge_pos1__oge_0(float %arg) {
2366 ; CHECK-LABEL: define i1 @assume_oge_pos1__oge_0(
2367 ; CHECK-SAME: float [[ARG:%.*]]) {
2368 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2369 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2370 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2371 ; CHECK-NEXT: ret i1 [[CMP]]
2373 %oge.pos1 = fcmp oge float %arg, 1.0
2374 call void @llvm.assume(i1 %oge.pos1)
2375 %cmp = fcmp oge float %arg, 0.0
2379 define i1 @assume_oge_pos1__olt_0(float %arg) {
2380 ; CHECK-LABEL: define i1 @assume_oge_pos1__olt_0(
2381 ; CHECK-SAME: float [[ARG:%.*]]) {
2382 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2383 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2384 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2385 ; CHECK-NEXT: ret i1 [[CMP]]
2387 %oge.pos1 = fcmp oge float %arg, 1.0
2388 call void @llvm.assume(i1 %oge.pos1)
2389 %cmp = fcmp olt float %arg, 0.0
2393 define i1 @assume_oge_pos1__ole_0(float %arg) {
2394 ; CHECK-LABEL: define i1 @assume_oge_pos1__ole_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: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2399 ; CHECK-NEXT: ret i1 [[CMP]]
2401 %oge.pos1 = fcmp oge float %arg, 1.0
2402 call void @llvm.assume(i1 %oge.pos1)
2403 %cmp = fcmp ole float %arg, 0.0
2407 define i1 @assume_oge_pos1__one_0(float %arg) {
2408 ; CHECK-LABEL: define i1 @assume_oge_pos1__one_0(
2409 ; CHECK-SAME: float [[ARG:%.*]]) {
2410 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2411 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2412 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2413 ; CHECK-NEXT: ret i1 [[CMP]]
2415 %oge.pos1 = fcmp oge float %arg, 1.0
2416 call void @llvm.assume(i1 %oge.pos1)
2417 %cmp = fcmp one float %arg, 0.0
2421 define i1 @assume_oge_pos1__ord_0(float %arg) {
2422 ; CHECK-LABEL: define i1 @assume_oge_pos1__ord_0(
2423 ; CHECK-SAME: float [[ARG:%.*]]) {
2424 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2425 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2426 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2427 ; CHECK-NEXT: ret i1 [[CMP]]
2429 %oge.pos1 = fcmp oge float %arg, 1.0
2430 call void @llvm.assume(i1 %oge.pos1)
2431 %cmp = fcmp ord float %arg, 0.0
2435 define i1 @assume_oge_pos1__ueq_0(float %arg) {
2436 ; CHECK-LABEL: define i1 @assume_oge_pos1__ueq_0(
2437 ; CHECK-SAME: float [[ARG:%.*]]) {
2438 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2439 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2440 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2441 ; CHECK-NEXT: ret i1 [[CMP]]
2443 %oge.pos1 = fcmp oge float %arg, 1.0
2444 call void @llvm.assume(i1 %oge.pos1)
2445 %cmp = fcmp ueq float %arg, 0.0
2449 define i1 @assume_oge_pos1__ugt_0(float %arg) {
2450 ; CHECK-LABEL: define i1 @assume_oge_pos1__ugt_0(
2451 ; CHECK-SAME: float [[ARG:%.*]]) {
2452 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2453 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2454 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2455 ; CHECK-NEXT: ret i1 [[CMP]]
2457 %oge.pos1 = fcmp oge float %arg, 1.0
2458 call void @llvm.assume(i1 %oge.pos1)
2459 %cmp = fcmp ugt float %arg, 0.0
2463 define i1 @assume_oge_pos1__uge_0(float %arg) {
2464 ; CHECK-LABEL: define i1 @assume_oge_pos1__uge_0(
2465 ; CHECK-SAME: float [[ARG:%.*]]) {
2466 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2467 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2468 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2469 ; CHECK-NEXT: ret i1 [[CMP]]
2471 %oge.pos1 = fcmp oge float %arg, 1.0
2472 call void @llvm.assume(i1 %oge.pos1)
2473 %cmp = fcmp uge float %arg, 0.0
2477 define i1 @assume_oge_pos1__ult_0(float %arg) {
2478 ; CHECK-LABEL: define i1 @assume_oge_pos1__ult_0(
2479 ; CHECK-SAME: float [[ARG:%.*]]) {
2480 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2481 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2482 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2483 ; CHECK-NEXT: ret i1 [[CMP]]
2485 %oge.pos1 = fcmp oge float %arg, 1.0
2486 call void @llvm.assume(i1 %oge.pos1)
2487 %cmp = fcmp ult float %arg, 0.0
2491 define i1 @assume_oge_pos1__ule_0(float %arg) {
2492 ; CHECK-LABEL: define i1 @assume_oge_pos1__ule_0(
2493 ; CHECK-SAME: float [[ARG:%.*]]) {
2494 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2495 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2496 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2497 ; CHECK-NEXT: ret i1 [[CMP]]
2499 %oge.pos1 = fcmp oge float %arg, 1.0
2500 call void @llvm.assume(i1 %oge.pos1)
2501 %cmp = fcmp ule float %arg, 0.0
2505 define i1 @assume_oge_pos1__une_0(float %arg) {
2506 ; CHECK-LABEL: define i1 @assume_oge_pos1__une_0(
2507 ; CHECK-SAME: float [[ARG:%.*]]) {
2508 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2509 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2510 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2511 ; CHECK-NEXT: ret i1 [[CMP]]
2513 %oge.pos1 = fcmp oge float %arg, 1.0
2514 call void @llvm.assume(i1 %oge.pos1)
2515 %cmp = fcmp une float %arg, 0.0
2519 define i1 @assume_oge_pos1__uno_0(float %arg) {
2520 ; CHECK-LABEL: define i1 @assume_oge_pos1__uno_0(
2521 ; CHECK-SAME: float [[ARG:%.*]]) {
2522 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2523 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2524 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2525 ; CHECK-NEXT: ret i1 [[CMP]]
2527 %oge.pos1 = fcmp oge float %arg, 1.0
2528 call void @llvm.assume(i1 %oge.pos1)
2529 %cmp = fcmp uno float %arg, 0.0
2533 ; --------------------------------------------------------------------
2534 ; Test assume x u> 1.0 with compares to 0
2535 ; --------------------------------------------------------------------
2537 define i1 @assume_ugt_pos1__oeq_0(float %arg) {
2538 ; CHECK-LABEL: define i1 @assume_ugt_pos1__oeq_0(
2539 ; CHECK-SAME: float [[ARG:%.*]]) {
2540 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2541 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2542 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2543 ; CHECK-NEXT: ret i1 [[CMP]]
2545 %ugt.pos1 = fcmp ugt float %arg, 1.0
2546 call void @llvm.assume(i1 %ugt.pos1)
2547 %cmp = fcmp oeq float %arg, 0.0
2551 define i1 @assume_ugt_pos1__ogt_0(float %arg) {
2552 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ogt_0(
2553 ; CHECK-SAME: float [[ARG:%.*]]) {
2554 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2555 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2556 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2557 ; CHECK-NEXT: ret i1 [[CMP]]
2559 %ugt.pos1 = fcmp ugt float %arg, 1.0
2560 call void @llvm.assume(i1 %ugt.pos1)
2561 %cmp = fcmp ogt float %arg, 0.0
2565 define i1 @assume_ugt_pos1__oge_0(float %arg) {
2566 ; CHECK-LABEL: define i1 @assume_ugt_pos1__oge_0(
2567 ; CHECK-SAME: float [[ARG:%.*]]) {
2568 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2569 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2570 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2571 ; CHECK-NEXT: ret i1 [[CMP]]
2573 %ugt.pos1 = fcmp ugt float %arg, 1.0
2574 call void @llvm.assume(i1 %ugt.pos1)
2575 %cmp = fcmp oge float %arg, 0.0
2579 define i1 @assume_ugt_pos1__olt_0(float %arg) {
2580 ; CHECK-LABEL: define i1 @assume_ugt_pos1__olt_0(
2581 ; CHECK-SAME: float [[ARG:%.*]]) {
2582 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2583 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2584 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2585 ; CHECK-NEXT: ret i1 [[CMP]]
2587 %ugt.pos1 = fcmp ugt float %arg, 1.0
2588 call void @llvm.assume(i1 %ugt.pos1)
2589 %cmp = fcmp olt float %arg, 0.0
2593 define i1 @assume_ugt_pos1__ole_0(float %arg) {
2594 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ole_0(
2595 ; CHECK-SAME: float [[ARG:%.*]]) {
2596 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2597 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2598 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2599 ; CHECK-NEXT: ret i1 [[CMP]]
2601 %ugt.pos1 = fcmp ugt float %arg, 1.0
2602 call void @llvm.assume(i1 %ugt.pos1)
2603 %cmp = fcmp ole float %arg, 0.0
2607 define i1 @assume_ugt_pos1__one_0(float %arg) {
2608 ; CHECK-LABEL: define i1 @assume_ugt_pos1__one_0(
2609 ; CHECK-SAME: float [[ARG:%.*]]) {
2610 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2611 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2612 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2613 ; CHECK-NEXT: ret i1 [[CMP]]
2615 %ugt.pos1 = fcmp ugt float %arg, 1.0
2616 call void @llvm.assume(i1 %ugt.pos1)
2617 %cmp = fcmp one float %arg, 0.0
2621 define i1 @assume_ugt_pos1__ord_0(float %arg) {
2622 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ord_0(
2623 ; CHECK-SAME: float [[ARG:%.*]]) {
2624 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2625 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2626 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2627 ; CHECK-NEXT: ret i1 [[CMP]]
2629 %ugt.pos1 = fcmp ugt float %arg, 1.0
2630 call void @llvm.assume(i1 %ugt.pos1)
2631 %cmp = fcmp ord float %arg, 0.0
2635 define i1 @assume_ugt_pos1__ueq_0(float %arg) {
2636 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ueq_0(
2637 ; CHECK-SAME: float [[ARG:%.*]]) {
2638 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2639 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2640 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2641 ; CHECK-NEXT: ret i1 [[CMP]]
2643 %ugt.pos1 = fcmp ugt float %arg, 1.0
2644 call void @llvm.assume(i1 %ugt.pos1)
2645 %cmp = fcmp ueq float %arg, 0.0
2649 define i1 @assume_ugt_pos1__ugt_0(float %arg) {
2650 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ugt_0(
2651 ; CHECK-SAME: float [[ARG:%.*]]) {
2652 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2653 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2654 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2655 ; CHECK-NEXT: ret i1 [[CMP]]
2657 %ugt.pos1 = fcmp ugt float %arg, 1.0
2658 call void @llvm.assume(i1 %ugt.pos1)
2659 %cmp = fcmp ugt float %arg, 0.0
2663 define i1 @assume_ugt_pos1__uge_0(float %arg) {
2664 ; CHECK-LABEL: define i1 @assume_ugt_pos1__uge_0(
2665 ; CHECK-SAME: float [[ARG:%.*]]) {
2666 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2667 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2668 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2669 ; CHECK-NEXT: ret i1 [[CMP]]
2671 %ugt.pos1 = fcmp ugt float %arg, 1.0
2672 call void @llvm.assume(i1 %ugt.pos1)
2673 %cmp = fcmp uge float %arg, 0.0
2677 define i1 @assume_ugt_pos1__ult_0(float %arg) {
2678 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ult_0(
2679 ; CHECK-SAME: float [[ARG:%.*]]) {
2680 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2681 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2682 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2683 ; CHECK-NEXT: ret i1 [[CMP]]
2685 %ugt.pos1 = fcmp ugt float %arg, 1.0
2686 call void @llvm.assume(i1 %ugt.pos1)
2687 %cmp = fcmp ult float %arg, 0.0
2691 define i1 @assume_ugt_pos1__ule_0(float %arg) {
2692 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ule_0(
2693 ; CHECK-SAME: float [[ARG:%.*]]) {
2694 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2695 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2696 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2697 ; CHECK-NEXT: ret i1 [[CMP]]
2699 %ugt.pos1 = fcmp ugt float %arg, 1.0
2700 call void @llvm.assume(i1 %ugt.pos1)
2701 %cmp = fcmp ule float %arg, 0.0
2705 define i1 @assume_ugt_pos1__une_0(float %arg) {
2706 ; CHECK-LABEL: define i1 @assume_ugt_pos1__une_0(
2707 ; CHECK-SAME: float [[ARG:%.*]]) {
2708 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2709 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2710 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2711 ; CHECK-NEXT: ret i1 [[CMP]]
2713 %ugt.pos1 = fcmp ugt float %arg, 1.0
2714 call void @llvm.assume(i1 %ugt.pos1)
2715 %cmp = fcmp une float %arg, 0.0
2719 define i1 @assume_ugt_pos1__uno_0(float %arg) {
2720 ; CHECK-LABEL: define i1 @assume_ugt_pos1__uno_0(
2721 ; CHECK-SAME: float [[ARG:%.*]]) {
2722 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2723 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2724 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2725 ; CHECK-NEXT: ret i1 [[CMP]]
2727 %ugt.pos1 = fcmp ugt float %arg, 1.0
2728 call void @llvm.assume(i1 %ugt.pos1)
2729 %cmp = fcmp uno float %arg, 0.0
2733 ; --------------------------------------------------------------------
2734 ; Test assume x u>= 1.0 with compares to 0
2735 ; --------------------------------------------------------------------
2737 define i1 @assume_uge_pos1__oeq_0(float %arg) {
2738 ; CHECK-LABEL: define i1 @assume_uge_pos1__oeq_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 oeq 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 oeq float %arg, 0.0
2751 define i1 @assume_uge_pos1__ogt_0(float %arg) {
2752 ; CHECK-LABEL: define i1 @assume_uge_pos1__ogt_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 ogt 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 ogt float %arg, 0.0
2765 define i1 @assume_uge_pos1__oge_0(float %arg) {
2766 ; CHECK-LABEL: define i1 @assume_uge_pos1__oge_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: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2771 ; CHECK-NEXT: ret i1 [[CMP]]
2773 %uge.pos1 = fcmp uge float %arg, 1.0
2774 call void @llvm.assume(i1 %uge.pos1)
2775 %cmp = fcmp oge float %arg, 0.0
2779 define i1 @assume_uge_pos1__olt_0(float %arg) {
2780 ; CHECK-LABEL: define i1 @assume_uge_pos1__olt_0(
2781 ; CHECK-SAME: float [[ARG:%.*]]) {
2782 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2783 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2784 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2785 ; CHECK-NEXT: ret i1 [[CMP]]
2787 %uge.pos1 = fcmp uge float %arg, 1.0
2788 call void @llvm.assume(i1 %uge.pos1)
2789 %cmp = fcmp olt float %arg, 0.0
2793 define i1 @assume_uge_pos1__ole_0(float %arg) {
2794 ; CHECK-LABEL: define i1 @assume_uge_pos1__ole_0(
2795 ; CHECK-SAME: float [[ARG:%.*]]) {
2796 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2797 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2798 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2799 ; CHECK-NEXT: ret i1 [[CMP]]
2801 %uge.pos1 = fcmp uge float %arg, 1.0
2802 call void @llvm.assume(i1 %uge.pos1)
2803 %cmp = fcmp ole float %arg, 0.0
2807 define i1 @assume_uge_pos1__one_0(float %arg) {
2808 ; CHECK-LABEL: define i1 @assume_uge_pos1__one_0(
2809 ; CHECK-SAME: float [[ARG:%.*]]) {
2810 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2811 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2812 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2813 ; CHECK-NEXT: ret i1 [[CMP]]
2815 %uge.pos1 = fcmp uge float %arg, 1.0
2816 call void @llvm.assume(i1 %uge.pos1)
2817 %cmp = fcmp one float %arg, 0.0
2821 define i1 @assume_uge_pos1__ord_0(float %arg) {
2822 ; CHECK-LABEL: define i1 @assume_uge_pos1__ord_0(
2823 ; CHECK-SAME: float [[ARG:%.*]]) {
2824 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2825 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2826 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2827 ; CHECK-NEXT: ret i1 [[CMP]]
2829 %uge.pos1 = fcmp uge float %arg, 1.0
2830 call void @llvm.assume(i1 %uge.pos1)
2831 %cmp = fcmp ord float %arg, 0.0
2835 define i1 @assume_uge_pos1__ueq_0(float %arg) {
2836 ; CHECK-LABEL: define i1 @assume_uge_pos1__ueq_0(
2837 ; CHECK-SAME: float [[ARG:%.*]]) {
2838 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2839 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2840 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2841 ; CHECK-NEXT: ret i1 [[CMP]]
2843 %uge.pos1 = fcmp uge float %arg, 1.0
2844 call void @llvm.assume(i1 %uge.pos1)
2845 %cmp = fcmp ueq float %arg, 0.0
2849 define i1 @assume_uge_pos1__ugt_0(float %arg) {
2850 ; CHECK-LABEL: define i1 @assume_uge_pos1__ugt_0(
2851 ; CHECK-SAME: float [[ARG:%.*]]) {
2852 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2853 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2854 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2855 ; CHECK-NEXT: ret i1 [[CMP]]
2857 %uge.pos1 = fcmp uge float %arg, 1.0
2858 call void @llvm.assume(i1 %uge.pos1)
2859 %cmp = fcmp ugt float %arg, 0.0
2863 define i1 @assume_uge_pos1__uge_0(float %arg) {
2864 ; CHECK-LABEL: define i1 @assume_uge_pos1__uge_0(
2865 ; CHECK-SAME: float [[ARG:%.*]]) {
2866 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2867 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2868 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2869 ; CHECK-NEXT: ret i1 [[CMP]]
2871 %uge.pos1 = fcmp uge float %arg, 1.0
2872 call void @llvm.assume(i1 %uge.pos1)
2873 %cmp = fcmp uge float %arg, 0.0
2877 define i1 @assume_uge_pos1__ult_0(float %arg) {
2878 ; CHECK-LABEL: define i1 @assume_uge_pos1__ult_0(
2879 ; CHECK-SAME: float [[ARG:%.*]]) {
2880 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2881 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2882 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2883 ; CHECK-NEXT: ret i1 [[CMP]]
2885 %uge.pos1 = fcmp uge float %arg, 1.0
2886 call void @llvm.assume(i1 %uge.pos1)
2887 %cmp = fcmp ult float %arg, 0.0
2891 define i1 @assume_uge_pos1__ule_0(float %arg) {
2892 ; CHECK-LABEL: define i1 @assume_uge_pos1__ule_0(
2893 ; CHECK-SAME: float [[ARG:%.*]]) {
2894 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2895 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2896 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2897 ; CHECK-NEXT: ret i1 [[CMP]]
2899 %uge.pos1 = fcmp uge float %arg, 1.0
2900 call void @llvm.assume(i1 %uge.pos1)
2901 %cmp = fcmp ule float %arg, 0.0
2905 define i1 @assume_uge_pos1__une_0(float %arg) {
2906 ; CHECK-LABEL: define i1 @assume_uge_pos1__une_0(
2907 ; CHECK-SAME: float [[ARG:%.*]]) {
2908 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2909 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2910 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2911 ; CHECK-NEXT: ret i1 [[CMP]]
2913 %uge.pos1 = fcmp uge float %arg, 1.0
2914 call void @llvm.assume(i1 %uge.pos1)
2915 %cmp = fcmp une float %arg, 0.0
2919 define i1 @assume_uge_pos1__uno_0(float %arg) {
2920 ; CHECK-LABEL: define i1 @assume_uge_pos1__uno_0(
2921 ; CHECK-SAME: float [[ARG:%.*]]) {
2922 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2923 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2924 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2925 ; CHECK-NEXT: ret i1 [[CMP]]
2927 %uge.pos1 = fcmp uge float %arg, 1.0
2928 call void @llvm.assume(i1 %uge.pos1)
2929 %cmp = fcmp uno float %arg, 0.0
2933 ; --------------------------------------------------------------------
2934 ; Test assume x < -1.0 with compares to inf
2935 ; --------------------------------------------------------------------
2937 define i1 @assume_olt_neg1__oeq_inf(float %arg) {
2938 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_inf(
2939 ; CHECK-SAME: float [[ARG:%.*]]) {
2940 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2941 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2942 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0x7FF0000000000000
2943 ; CHECK-NEXT: ret i1 [[CMP]]
2945 %olt.neg1 = fcmp olt float %arg, -1.0
2946 call void @llvm.assume(i1 %olt.neg1)
2947 %cmp = fcmp oeq float %arg, 0x7FF0000000000000
2951 define i1 @assume_olt_neg1__one_inf(float %arg) {
2952 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_inf(
2953 ; CHECK-SAME: float [[ARG:%.*]]) {
2954 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2955 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2956 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0x7FF0000000000000
2957 ; CHECK-NEXT: ret i1 [[CMP]]
2959 %olt.neg1 = fcmp olt float %arg, -1.0
2960 call void @llvm.assume(i1 %olt.neg1)
2961 %cmp = fcmp one float %arg, 0x7FF0000000000000
2965 define i1 @assume_olt_neg1__oeq_ninf(float %arg) {
2966 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_ninf(
2967 ; CHECK-SAME: float [[ARG:%.*]]) {
2968 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2969 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2970 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
2971 ; CHECK-NEXT: ret i1 [[CMP]]
2973 %olt.neg1 = fcmp olt float %arg, -1.0
2974 call void @llvm.assume(i1 %olt.neg1)
2975 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
2979 define i1 @assume_olt_neg1__one_ninf(float %arg) {
2980 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_ninf(
2981 ; CHECK-SAME: float [[ARG:%.*]]) {
2982 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2983 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2984 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0xFFF0000000000000
2985 ; CHECK-NEXT: ret i1 [[CMP]]
2987 %olt.neg1 = fcmp olt float %arg, -1.0
2988 call void @llvm.assume(i1 %olt.neg1)
2989 %cmp = fcmp one float %arg, 0xFFF0000000000000
2993 ; --------------------------------------------------------------------
2995 ; --------------------------------------------------------------------
2997 define i1 @assume_olt_1__oeq_2(float %arg) {
2998 ; CHECK-LABEL: define i1 @assume_olt_1__oeq_2(
2999 ; CHECK-SAME: float [[ARG:%.*]]) {
3000 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
3001 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
3002 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 2.000000e+00
3003 ; CHECK-NEXT: ret i1 [[CMP]]
3005 %olt.1 = fcmp olt float %arg, 1.0
3006 call void @llvm.assume(i1 %olt.1)
3007 %cmp = fcmp oeq float %arg, 2.0
3011 ; Ideally would fold to false
3012 define i1 @assume_ogt_2__oeq_2(float %arg) {
3013 ; CHECK-LABEL: define i1 @assume_ogt_2__oeq_2(
3014 ; CHECK-SAME: float [[ARG:%.*]]) {
3015 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp ogt float [[ARG]], 2.000000e+00
3016 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
3017 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 2.000000e+00
3018 ; CHECK-NEXT: ret i1 [[CMP]]
3020 %olt.1 = fcmp ogt float %arg, 2.0
3021 call void @llvm.assume(i1 %olt.1)
3022 %cmp = fcmp oeq float %arg, 2.0
3026 define i1 @assume_olt_2__olt_1(float %arg) {
3027 ; CHECK-LABEL: define i1 @assume_olt_2__olt_1(
3028 ; CHECK-SAME: float [[ARG:%.*]]) {
3029 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp olt float [[ARG]], 2.000000e+00
3030 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
3031 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
3032 ; CHECK-NEXT: ret i1 [[CMP]]
3034 %olt.1 = fcmp olt float %arg, 2.0
3035 call void @llvm.assume(i1 %olt.1)
3036 %cmp = fcmp olt float %arg, 1.0
3040 attributes #0 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }