1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
2 ; RUN: opt -S -passes=instsimplify %s | FileCheck %s
4 ; Test that we're able to make use of assumes of fcmps with constants
5 ; that aren't 0/inf/smallest-normal. Range checks can exclude certain
8 declare void @llvm.assume(i1 noundef) #0
9 declare float @llvm.fabs.f32(float) #0
11 ; --------------------------------------------------------------------
12 ; Test assume x < -1.0 with compares to 0
13 ; --------------------------------------------------------------------
15 define i1 @assume_olt_neg1__oeq_0(float %arg) {
16 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_0(
17 ; CHECK-SAME: float [[ARG:%.*]]) {
18 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
19 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
20 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
21 ; CHECK-NEXT: ret i1 [[CMP]]
23 %olt.neg1 = fcmp olt float %arg, -1.0
24 call void @llvm.assume(i1 %olt.neg1)
25 %cmp = fcmp oeq float %arg, 0.0
29 define i1 @assume_olt_neg1__ogt_0(float %arg) {
30 ; CHECK-LABEL: define i1 @assume_olt_neg1__ogt_0(
31 ; CHECK-SAME: float [[ARG:%.*]]) {
32 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
33 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
34 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
35 ; CHECK-NEXT: ret i1 [[CMP]]
37 %olt.neg1 = fcmp olt float %arg, -1.0
38 call void @llvm.assume(i1 %olt.neg1)
39 %cmp = fcmp ogt float %arg, 0.0
43 define i1 @assume_olt_neg1__oge_0(float %arg) {
44 ; CHECK-LABEL: define i1 @assume_olt_neg1__oge_0(
45 ; CHECK-SAME: float [[ARG:%.*]]) {
46 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
47 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
48 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
49 ; CHECK-NEXT: ret i1 [[CMP]]
51 %olt.neg1 = fcmp olt float %arg, -1.0
52 call void @llvm.assume(i1 %olt.neg1)
53 %cmp = fcmp oge float %arg, 0.0
57 define i1 @assume_olt_neg1__olt_0(float %arg) {
58 ; CHECK-LABEL: define i1 @assume_olt_neg1__olt_0(
59 ; CHECK-SAME: float [[ARG:%.*]]) {
60 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
61 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
62 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
63 ; CHECK-NEXT: ret i1 [[CMP]]
65 %olt.neg1 = fcmp olt float %arg, -1.0
66 call void @llvm.assume(i1 %olt.neg1)
67 %cmp = fcmp olt float %arg, 0.0
71 define i1 @assume_olt_neg1__ole_0(float %arg) {
72 ; CHECK-LABEL: define i1 @assume_olt_neg1__ole_0(
73 ; CHECK-SAME: float [[ARG:%.*]]) {
74 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
75 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
76 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
77 ; CHECK-NEXT: ret i1 [[CMP]]
79 %olt.neg1 = fcmp olt float %arg, -1.0
80 call void @llvm.assume(i1 %olt.neg1)
81 %cmp = fcmp ole float %arg, 0.0
85 define i1 @assume_olt_neg1__one_0(float %arg) {
86 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_0(
87 ; CHECK-SAME: float [[ARG:%.*]]) {
88 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
89 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
90 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
91 ; CHECK-NEXT: ret i1 [[CMP]]
93 %olt.neg1 = fcmp olt float %arg, -1.0
94 call void @llvm.assume(i1 %olt.neg1)
95 %cmp = fcmp one float %arg, 0.0
99 define i1 @assume_olt_neg1__ord_0(float %arg) {
100 ; CHECK-LABEL: define i1 @assume_olt_neg1__ord_0(
101 ; CHECK-SAME: float [[ARG:%.*]]) {
102 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
103 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
104 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
105 ; CHECK-NEXT: ret i1 [[CMP]]
107 %olt.neg1 = fcmp olt float %arg, -1.0
108 call void @llvm.assume(i1 %olt.neg1)
109 %cmp = fcmp ord float %arg, 0.0
113 define i1 @assume_olt_neg1__ueq_0(float %arg) {
114 ; CHECK-LABEL: define i1 @assume_olt_neg1__ueq_0(
115 ; CHECK-SAME: float [[ARG:%.*]]) {
116 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
117 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
118 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
119 ; CHECK-NEXT: ret i1 [[CMP]]
121 %olt.neg1 = fcmp olt float %arg, -1.0
122 call void @llvm.assume(i1 %olt.neg1)
123 %cmp = fcmp ueq float %arg, 0.0
127 define i1 @assume_olt_neg1__ugt_0(float %arg) {
128 ; CHECK-LABEL: define i1 @assume_olt_neg1__ugt_0(
129 ; CHECK-SAME: float [[ARG:%.*]]) {
130 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
131 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
132 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
133 ; CHECK-NEXT: ret i1 [[CMP]]
135 %olt.neg1 = fcmp olt float %arg, -1.0
136 call void @llvm.assume(i1 %olt.neg1)
137 %cmp = fcmp ugt float %arg, 0.0
141 define i1 @assume_olt_neg1__uge_0(float %arg) {
142 ; CHECK-LABEL: define i1 @assume_olt_neg1__uge_0(
143 ; CHECK-SAME: float [[ARG:%.*]]) {
144 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
145 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
146 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
147 ; CHECK-NEXT: ret i1 [[CMP]]
149 %olt.neg1 = fcmp olt float %arg, -1.0
150 call void @llvm.assume(i1 %olt.neg1)
151 %cmp = fcmp uge float %arg, 0.0
155 define i1 @assume_olt_neg1__ult_0(float %arg) {
156 ; CHECK-LABEL: define i1 @assume_olt_neg1__ult_0(
157 ; CHECK-SAME: float [[ARG:%.*]]) {
158 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
159 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
160 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
161 ; CHECK-NEXT: ret i1 [[CMP]]
163 %olt.neg1 = fcmp olt float %arg, -1.0
164 call void @llvm.assume(i1 %olt.neg1)
165 %cmp = fcmp ult float %arg, 0.0
169 define i1 @assume_olt_neg1__ule_0(float %arg) {
170 ; CHECK-LABEL: define i1 @assume_olt_neg1__ule_0(
171 ; CHECK-SAME: float [[ARG:%.*]]) {
172 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
173 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
174 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
175 ; CHECK-NEXT: ret i1 [[CMP]]
177 %olt.neg1 = fcmp olt float %arg, -1.0
178 call void @llvm.assume(i1 %olt.neg1)
179 %cmp = fcmp ule float %arg, 0.0
183 define i1 @assume_olt_neg1__une_0(float %arg) {
184 ; CHECK-LABEL: define i1 @assume_olt_neg1__une_0(
185 ; CHECK-SAME: float [[ARG:%.*]]) {
186 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
187 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
188 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
189 ; CHECK-NEXT: ret i1 [[CMP]]
191 %olt.neg1 = fcmp olt float %arg, -1.0
192 call void @llvm.assume(i1 %olt.neg1)
193 %cmp = fcmp une float %arg, 0.0
197 define i1 @assume_olt_neg1__uno_0(float %arg) {
198 ; CHECK-LABEL: define i1 @assume_olt_neg1__uno_0(
199 ; CHECK-SAME: float [[ARG:%.*]]) {
200 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
201 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
202 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
203 ; CHECK-NEXT: ret i1 [[CMP]]
205 %olt.neg1 = fcmp olt float %arg, -1.0
206 call void @llvm.assume(i1 %olt.neg1)
207 %cmp = fcmp uno float %arg, 0.0
211 ; --------------------------------------------------------------------
212 ; Test assume x <= -1.0 with compares to 0
213 ; --------------------------------------------------------------------
215 define i1 @assume_ole_neg1__oeq_0(float %arg) {
216 ; CHECK-LABEL: define i1 @assume_ole_neg1__oeq_0(
217 ; CHECK-SAME: float [[ARG:%.*]]) {
218 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
219 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
220 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
221 ; CHECK-NEXT: ret i1 [[CMP]]
223 %ole.neg1 = fcmp ole float %arg, -1.0
224 call void @llvm.assume(i1 %ole.neg1)
225 %cmp = fcmp oeq float %arg, 0.0
229 define i1 @assume_ole_neg1__ogt_0(float %arg) {
230 ; CHECK-LABEL: define i1 @assume_ole_neg1__ogt_0(
231 ; CHECK-SAME: float [[ARG:%.*]]) {
232 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
233 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
234 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
235 ; CHECK-NEXT: ret i1 [[CMP]]
237 %ole.neg1 = fcmp ole float %arg, -1.0
238 call void @llvm.assume(i1 %ole.neg1)
239 %cmp = fcmp ogt float %arg, 0.0
243 define i1 @assume_ole_neg1__oge_0(float %arg) {
244 ; CHECK-LABEL: define i1 @assume_ole_neg1__oge_0(
245 ; CHECK-SAME: float [[ARG:%.*]]) {
246 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
247 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
248 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
249 ; CHECK-NEXT: ret i1 [[CMP]]
251 %ole.neg1 = fcmp ole float %arg, -1.0
252 call void @llvm.assume(i1 %ole.neg1)
253 %cmp = fcmp oge float %arg, 0.0
257 define i1 @assume_ole_neg1__olt_0(float %arg) {
258 ; CHECK-LABEL: define i1 @assume_ole_neg1__olt_0(
259 ; CHECK-SAME: float [[ARG:%.*]]) {
260 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
261 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
262 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
263 ; CHECK-NEXT: ret i1 [[CMP]]
265 %ole.neg1 = fcmp ole float %arg, -1.0
266 call void @llvm.assume(i1 %ole.neg1)
267 %cmp = fcmp olt float %arg, 0.0
271 define i1 @assume_ole_neg1__ole_0(float %arg) {
272 ; CHECK-LABEL: define i1 @assume_ole_neg1__ole_0(
273 ; CHECK-SAME: float [[ARG:%.*]]) {
274 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
275 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
276 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
277 ; CHECK-NEXT: ret i1 [[CMP]]
279 %ole.neg1 = fcmp ole float %arg, -1.0
280 call void @llvm.assume(i1 %ole.neg1)
281 %cmp = fcmp ole float %arg, 0.0
285 define i1 @assume_ole_neg1__one_0(float %arg) {
286 ; CHECK-LABEL: define i1 @assume_ole_neg1__one_0(
287 ; CHECK-SAME: float [[ARG:%.*]]) {
288 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
289 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
290 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
291 ; CHECK-NEXT: ret i1 [[CMP]]
293 %ole.neg1 = fcmp ole float %arg, -1.0
294 call void @llvm.assume(i1 %ole.neg1)
295 %cmp = fcmp one float %arg, 0.0
299 define i1 @assume_ole_neg1__ord_0(float %arg) {
300 ; CHECK-LABEL: define i1 @assume_ole_neg1__ord_0(
301 ; CHECK-SAME: float [[ARG:%.*]]) {
302 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
303 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
304 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
305 ; CHECK-NEXT: ret i1 [[CMP]]
307 %ole.neg1 = fcmp ole float %arg, -1.0
308 call void @llvm.assume(i1 %ole.neg1)
309 %cmp = fcmp ord float %arg, 0.0
313 define i1 @assume_ole_neg1__ueq_0(float %arg) {
314 ; CHECK-LABEL: define i1 @assume_ole_neg1__ueq_0(
315 ; CHECK-SAME: float [[ARG:%.*]]) {
316 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
317 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
318 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
319 ; CHECK-NEXT: ret i1 [[CMP]]
321 %ole.neg1 = fcmp ole float %arg, -1.0
322 call void @llvm.assume(i1 %ole.neg1)
323 %cmp = fcmp ueq float %arg, 0.0
327 define i1 @assume_ole_neg1__ugt_0(float %arg) {
328 ; CHECK-LABEL: define i1 @assume_ole_neg1__ugt_0(
329 ; CHECK-SAME: float [[ARG:%.*]]) {
330 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
331 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
332 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
333 ; CHECK-NEXT: ret i1 [[CMP]]
335 %ole.neg1 = fcmp ole float %arg, -1.0
336 call void @llvm.assume(i1 %ole.neg1)
337 %cmp = fcmp ugt float %arg, 0.0
341 define i1 @assume_ole_neg1__uge_0(float %arg) {
342 ; CHECK-LABEL: define i1 @assume_ole_neg1__uge_0(
343 ; CHECK-SAME: float [[ARG:%.*]]) {
344 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
345 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
346 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
347 ; CHECK-NEXT: ret i1 [[CMP]]
349 %ole.neg1 = fcmp ole float %arg, -1.0
350 call void @llvm.assume(i1 %ole.neg1)
351 %cmp = fcmp uge float %arg, 0.0
355 define i1 @assume_ole_neg1__ult_0(float %arg) {
356 ; CHECK-LABEL: define i1 @assume_ole_neg1__ult_0(
357 ; CHECK-SAME: float [[ARG:%.*]]) {
358 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
359 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
360 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
361 ; CHECK-NEXT: ret i1 [[CMP]]
363 %ole.neg1 = fcmp ole float %arg, -1.0
364 call void @llvm.assume(i1 %ole.neg1)
365 %cmp = fcmp ult float %arg, 0.0
369 define i1 @assume_ole_neg1__ule_0(float %arg) {
370 ; CHECK-LABEL: define i1 @assume_ole_neg1__ule_0(
371 ; CHECK-SAME: float [[ARG:%.*]]) {
372 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
373 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
374 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
375 ; CHECK-NEXT: ret i1 [[CMP]]
377 %ole.neg1 = fcmp ole float %arg, -1.0
378 call void @llvm.assume(i1 %ole.neg1)
379 %cmp = fcmp ule float %arg, 0.0
383 define i1 @assume_ole_neg1__une_0(float %arg) {
384 ; CHECK-LABEL: define i1 @assume_ole_neg1__une_0(
385 ; CHECK-SAME: float [[ARG:%.*]]) {
386 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
387 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
388 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
389 ; CHECK-NEXT: ret i1 [[CMP]]
391 %ole.neg1 = fcmp ole float %arg, -1.0
392 call void @llvm.assume(i1 %ole.neg1)
393 %cmp = fcmp une float %arg, 0.0
397 define i1 @assume_ole_neg1__uno_0(float %arg) {
398 ; CHECK-LABEL: define i1 @assume_ole_neg1__uno_0(
399 ; CHECK-SAME: float [[ARG:%.*]]) {
400 ; CHECK-NEXT: [[OLE_NEG1:%.*]] = fcmp ole float [[ARG]], -1.000000e+00
401 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_NEG1]])
402 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
403 ; CHECK-NEXT: ret i1 [[CMP]]
405 %ole.neg1 = fcmp ole float %arg, -1.0
406 call void @llvm.assume(i1 %ole.neg1)
407 %cmp = fcmp uno float %arg, 0.0
411 ; --------------------------------------------------------------------
412 ; Test assume x > -1.0 with compares to 0
413 ; --------------------------------------------------------------------
415 define i1 @assume_ogt_neg1__oeq_0(float %arg) {
416 ; CHECK-LABEL: define i1 @assume_ogt_neg1__oeq_0(
417 ; CHECK-SAME: float [[ARG:%.*]]) {
418 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
419 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
420 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
421 ; CHECK-NEXT: ret i1 [[CMP]]
423 %ogt.neg1 = fcmp ogt float %arg, -1.0
424 call void @llvm.assume(i1 %ogt.neg1)
425 %cmp = fcmp oeq float %arg, 0.0
429 define i1 @assume_ogt_neg1__ogt_0(float %arg) {
430 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ogt_0(
431 ; CHECK-SAME: float [[ARG:%.*]]) {
432 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
433 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
434 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
435 ; CHECK-NEXT: ret i1 [[CMP]]
437 %ogt.neg1 = fcmp ogt float %arg, -1.0
438 call void @llvm.assume(i1 %ogt.neg1)
439 %cmp = fcmp ogt float %arg, 0.0
443 define i1 @assume_ogt_neg1__oge_0(float %arg) {
444 ; CHECK-LABEL: define i1 @assume_ogt_neg1__oge_0(
445 ; CHECK-SAME: float [[ARG:%.*]]) {
446 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
447 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
448 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
449 ; CHECK-NEXT: ret i1 [[CMP]]
451 %ogt.neg1 = fcmp ogt float %arg, -1.0
452 call void @llvm.assume(i1 %ogt.neg1)
453 %cmp = fcmp oge float %arg, 0.0
457 define i1 @assume_ogt_neg1__olt_0(float %arg) {
458 ; CHECK-LABEL: define i1 @assume_ogt_neg1__olt_0(
459 ; CHECK-SAME: float [[ARG:%.*]]) {
460 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
461 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
462 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
463 ; CHECK-NEXT: ret i1 [[CMP]]
465 %ogt.neg1 = fcmp ogt float %arg, -1.0
466 call void @llvm.assume(i1 %ogt.neg1)
467 %cmp = fcmp olt float %arg, 0.0
471 define i1 @assume_ogt_neg1__ole_0(float %arg) {
472 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ole_0(
473 ; CHECK-SAME: float [[ARG:%.*]]) {
474 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
475 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
476 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
477 ; CHECK-NEXT: ret i1 [[CMP]]
479 %ogt.neg1 = fcmp ogt float %arg, -1.0
480 call void @llvm.assume(i1 %ogt.neg1)
481 %cmp = fcmp ole float %arg, 0.0
485 define i1 @assume_ogt_neg1__one_0(float %arg) {
486 ; CHECK-LABEL: define i1 @assume_ogt_neg1__one_0(
487 ; CHECK-SAME: float [[ARG:%.*]]) {
488 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
489 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
490 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
491 ; CHECK-NEXT: ret i1 [[CMP]]
493 %ogt.neg1 = fcmp ogt float %arg, -1.0
494 call void @llvm.assume(i1 %ogt.neg1)
495 %cmp = fcmp one float %arg, 0.0
499 define i1 @assume_ogt_neg1__ord_0(float %arg) {
500 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ord_0(
501 ; CHECK-SAME: float [[ARG:%.*]]) {
502 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
503 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
504 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
505 ; CHECK-NEXT: ret i1 [[CMP]]
507 %ogt.neg1 = fcmp ogt float %arg, -1.0
508 call void @llvm.assume(i1 %ogt.neg1)
509 %cmp = fcmp ord float %arg, 0.0
513 define i1 @assume_ogt_neg1__ueq_0(float %arg) {
514 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ueq_0(
515 ; CHECK-SAME: float [[ARG:%.*]]) {
516 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
517 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
518 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
519 ; CHECK-NEXT: ret i1 [[CMP]]
521 %ogt.neg1 = fcmp ogt float %arg, -1.0
522 call void @llvm.assume(i1 %ogt.neg1)
523 %cmp = fcmp ueq float %arg, 0.0
527 define i1 @assume_ogt_neg1__ugt_0(float %arg) {
528 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ugt_0(
529 ; CHECK-SAME: float [[ARG:%.*]]) {
530 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
531 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
532 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
533 ; CHECK-NEXT: ret i1 [[CMP]]
535 %ogt.neg1 = fcmp ogt float %arg, -1.0
536 call void @llvm.assume(i1 %ogt.neg1)
537 %cmp = fcmp ugt float %arg, 0.0
541 define i1 @assume_ogt_neg1__uge_0(float %arg) {
542 ; CHECK-LABEL: define i1 @assume_ogt_neg1__uge_0(
543 ; CHECK-SAME: float [[ARG:%.*]]) {
544 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
545 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
546 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
547 ; CHECK-NEXT: ret i1 [[CMP]]
549 %ogt.neg1 = fcmp ogt float %arg, -1.0
550 call void @llvm.assume(i1 %ogt.neg1)
551 %cmp = fcmp uge float %arg, 0.0
555 define i1 @assume_ogt_neg1__ult_0(float %arg) {
556 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ult_0(
557 ; CHECK-SAME: float [[ARG:%.*]]) {
558 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
559 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
560 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
561 ; CHECK-NEXT: ret i1 [[CMP]]
563 %ogt.neg1 = fcmp ogt float %arg, -1.0
564 call void @llvm.assume(i1 %ogt.neg1)
565 %cmp = fcmp ult float %arg, 0.0
569 define i1 @assume_ogt_neg1__ule_0(float %arg) {
570 ; CHECK-LABEL: define i1 @assume_ogt_neg1__ule_0(
571 ; CHECK-SAME: float [[ARG:%.*]]) {
572 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
573 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
574 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
575 ; CHECK-NEXT: ret i1 [[CMP]]
577 %ogt.neg1 = fcmp ogt float %arg, -1.0
578 call void @llvm.assume(i1 %ogt.neg1)
579 %cmp = fcmp ule float %arg, 0.0
583 define i1 @assume_ogt_neg1__une_0(float %arg) {
584 ; CHECK-LABEL: define i1 @assume_ogt_neg1__une_0(
585 ; CHECK-SAME: float [[ARG:%.*]]) {
586 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
587 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
588 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
589 ; CHECK-NEXT: ret i1 [[CMP]]
591 %ogt.neg1 = fcmp ogt float %arg, -1.0
592 call void @llvm.assume(i1 %ogt.neg1)
593 %cmp = fcmp une float %arg, 0.0
597 define i1 @assume_ogt_neg1__uno_0(float %arg) {
598 ; CHECK-LABEL: define i1 @assume_ogt_neg1__uno_0(
599 ; CHECK-SAME: float [[ARG:%.*]]) {
600 ; CHECK-NEXT: [[OGT_NEG1:%.*]] = fcmp ogt float [[ARG]], -1.000000e+00
601 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_NEG1]])
602 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
603 ; CHECK-NEXT: ret i1 [[CMP]]
605 %ogt.neg1 = fcmp ogt float %arg, -1.0
606 call void @llvm.assume(i1 %ogt.neg1)
607 %cmp = fcmp uno float %arg, 0.0
611 ; --------------------------------------------------------------------
612 ; Test assume x >= -1.0 with compares to 0
613 ; --------------------------------------------------------------------
615 define i1 @assume_oge_neg1__oeq_0(float %arg) {
616 ; CHECK-LABEL: define i1 @assume_oge_neg1__oeq_0(
617 ; CHECK-SAME: float [[ARG:%.*]]) {
618 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
619 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
620 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
621 ; CHECK-NEXT: ret i1 [[CMP]]
623 %oge.neg1 = fcmp oge float %arg, -1.0
624 call void @llvm.assume(i1 %oge.neg1)
625 %cmp = fcmp oeq float %arg, 0.0
629 define i1 @assume_oge_neg1__ogt_0(float %arg) {
630 ; CHECK-LABEL: define i1 @assume_oge_neg1__ogt_0(
631 ; CHECK-SAME: float [[ARG:%.*]]) {
632 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
633 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
634 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
635 ; CHECK-NEXT: ret i1 [[CMP]]
637 %oge.neg1 = fcmp oge float %arg, -1.0
638 call void @llvm.assume(i1 %oge.neg1)
639 %cmp = fcmp ogt float %arg, 0.0
643 define i1 @assume_oge_neg1__oge_0(float %arg) {
644 ; CHECK-LABEL: define i1 @assume_oge_neg1__oge_0(
645 ; CHECK-SAME: float [[ARG:%.*]]) {
646 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
647 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
648 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
649 ; CHECK-NEXT: ret i1 [[CMP]]
651 %oge.neg1 = fcmp oge float %arg, -1.0
652 call void @llvm.assume(i1 %oge.neg1)
653 %cmp = fcmp oge float %arg, 0.0
657 define i1 @assume_oge_neg1__olt_0(float %arg) {
658 ; CHECK-LABEL: define i1 @assume_oge_neg1__olt_0(
659 ; CHECK-SAME: float [[ARG:%.*]]) {
660 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
661 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
662 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
663 ; CHECK-NEXT: ret i1 [[CMP]]
665 %oge.neg1 = fcmp oge float %arg, -1.0
666 call void @llvm.assume(i1 %oge.neg1)
667 %cmp = fcmp olt float %arg, 0.0
671 define i1 @assume_oge_neg1__ole_0(float %arg) {
672 ; CHECK-LABEL: define i1 @assume_oge_neg1__ole_0(
673 ; CHECK-SAME: float [[ARG:%.*]]) {
674 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
675 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
676 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
677 ; CHECK-NEXT: ret i1 [[CMP]]
679 %oge.neg1 = fcmp oge float %arg, -1.0
680 call void @llvm.assume(i1 %oge.neg1)
681 %cmp = fcmp ole float %arg, 0.0
685 define i1 @assume_oge_neg1__one_0(float %arg) {
686 ; CHECK-LABEL: define i1 @assume_oge_neg1__one_0(
687 ; CHECK-SAME: float [[ARG:%.*]]) {
688 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
689 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
690 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
691 ; CHECK-NEXT: ret i1 [[CMP]]
693 %oge.neg1 = fcmp oge float %arg, -1.0
694 call void @llvm.assume(i1 %oge.neg1)
695 %cmp = fcmp one float %arg, 0.0
699 define i1 @assume_oge_neg1__ord_0(float %arg) {
700 ; CHECK-LABEL: define i1 @assume_oge_neg1__ord_0(
701 ; CHECK-SAME: float [[ARG:%.*]]) {
702 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
703 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
704 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
705 ; CHECK-NEXT: ret i1 [[CMP]]
707 %oge.neg1 = fcmp oge float %arg, -1.0
708 call void @llvm.assume(i1 %oge.neg1)
709 %cmp = fcmp ord float %arg, 0.0
713 define i1 @assume_oge_neg1__ueq_0(float %arg) {
714 ; CHECK-LABEL: define i1 @assume_oge_neg1__ueq_0(
715 ; CHECK-SAME: float [[ARG:%.*]]) {
716 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
717 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
718 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
719 ; CHECK-NEXT: ret i1 [[CMP]]
721 %oge.neg1 = fcmp oge float %arg, -1.0
722 call void @llvm.assume(i1 %oge.neg1)
723 %cmp = fcmp ueq float %arg, 0.0
727 define i1 @assume_oge_neg1__ugt_0(float %arg) {
728 ; CHECK-LABEL: define i1 @assume_oge_neg1__ugt_0(
729 ; CHECK-SAME: float [[ARG:%.*]]) {
730 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
731 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
732 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
733 ; CHECK-NEXT: ret i1 [[CMP]]
735 %oge.neg1 = fcmp oge float %arg, -1.0
736 call void @llvm.assume(i1 %oge.neg1)
737 %cmp = fcmp ugt float %arg, 0.0
741 define i1 @assume_oge_neg1__uge_0(float %arg) {
742 ; CHECK-LABEL: define i1 @assume_oge_neg1__uge_0(
743 ; CHECK-SAME: float [[ARG:%.*]]) {
744 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
745 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
746 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
747 ; CHECK-NEXT: ret i1 [[CMP]]
749 %oge.neg1 = fcmp oge float %arg, -1.0
750 call void @llvm.assume(i1 %oge.neg1)
751 %cmp = fcmp uge float %arg, 0.0
755 define i1 @assume_oge_neg1__ult_0(float %arg) {
756 ; CHECK-LABEL: define i1 @assume_oge_neg1__ult_0(
757 ; CHECK-SAME: float [[ARG:%.*]]) {
758 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
759 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
760 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
761 ; CHECK-NEXT: ret i1 [[CMP]]
763 %oge.neg1 = fcmp oge float %arg, -1.0
764 call void @llvm.assume(i1 %oge.neg1)
765 %cmp = fcmp ult float %arg, 0.0
769 define i1 @assume_oge_neg1__ule_0(float %arg) {
770 ; CHECK-LABEL: define i1 @assume_oge_neg1__ule_0(
771 ; CHECK-SAME: float [[ARG:%.*]]) {
772 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
773 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
774 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
775 ; CHECK-NEXT: ret i1 [[CMP]]
777 %oge.neg1 = fcmp oge float %arg, -1.0
778 call void @llvm.assume(i1 %oge.neg1)
779 %cmp = fcmp ule float %arg, 0.0
783 define i1 @assume_oge_neg1__une_0(float %arg) {
784 ; CHECK-LABEL: define i1 @assume_oge_neg1__une_0(
785 ; CHECK-SAME: float [[ARG:%.*]]) {
786 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
787 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
788 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
789 ; CHECK-NEXT: ret i1 [[CMP]]
791 %oge.neg1 = fcmp oge float %arg, -1.0
792 call void @llvm.assume(i1 %oge.neg1)
793 %cmp = fcmp une float %arg, 0.0
797 define i1 @assume_oge_neg1__uno_0(float %arg) {
798 ; CHECK-LABEL: define i1 @assume_oge_neg1__uno_0(
799 ; CHECK-SAME: float [[ARG:%.*]]) {
800 ; CHECK-NEXT: [[OGE_NEG1:%.*]] = fcmp oge float [[ARG]], -1.000000e+00
801 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_NEG1]])
802 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
803 ; CHECK-NEXT: ret i1 [[CMP]]
805 %oge.neg1 = fcmp oge float %arg, -1.0
806 call void @llvm.assume(i1 %oge.neg1)
807 %cmp = fcmp uno float %arg, 0.0
811 ; --------------------------------------------------------------------
812 ; Test assume x u>= -1.0 with compares to 0
813 ; --------------------------------------------------------------------
815 define i1 @assume_uge_neg1__oeq_0(float %arg) {
816 ; CHECK-LABEL: define i1 @assume_uge_neg1__oeq_0(
817 ; CHECK-SAME: float [[ARG:%.*]]) {
818 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
819 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
820 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
821 ; CHECK-NEXT: ret i1 [[CMP]]
823 %uge.neg1 = fcmp uge float %arg, -1.0
824 call void @llvm.assume(i1 %uge.neg1)
825 %cmp = fcmp oeq float %arg, 0.0
829 define i1 @assume_uge_neg1__ogt_0(float %arg) {
830 ; CHECK-LABEL: define i1 @assume_uge_neg1__ogt_0(
831 ; CHECK-SAME: float [[ARG:%.*]]) {
832 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
833 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
834 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
835 ; CHECK-NEXT: ret i1 [[CMP]]
837 %uge.neg1 = fcmp uge float %arg, -1.0
838 call void @llvm.assume(i1 %uge.neg1)
839 %cmp = fcmp ogt float %arg, 0.0
843 define i1 @assume_uge_neg1__oge_0(float %arg) {
844 ; CHECK-LABEL: define i1 @assume_uge_neg1__oge_0(
845 ; CHECK-SAME: float [[ARG:%.*]]) {
846 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
847 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
848 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
849 ; CHECK-NEXT: ret i1 [[CMP]]
851 %uge.neg1 = fcmp uge float %arg, -1.0
852 call void @llvm.assume(i1 %uge.neg1)
853 %cmp = fcmp oge float %arg, 0.0
857 define i1 @assume_uge_neg1__olt_0(float %arg) {
858 ; CHECK-LABEL: define i1 @assume_uge_neg1__olt_0(
859 ; CHECK-SAME: float [[ARG:%.*]]) {
860 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
861 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
862 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
863 ; CHECK-NEXT: ret i1 [[CMP]]
865 %uge.neg1 = fcmp uge float %arg, -1.0
866 call void @llvm.assume(i1 %uge.neg1)
867 %cmp = fcmp olt float %arg, 0.0
871 define i1 @assume_uge_neg1__ole_0(float %arg) {
872 ; CHECK-LABEL: define i1 @assume_uge_neg1__ole_0(
873 ; CHECK-SAME: float [[ARG:%.*]]) {
874 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
875 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
876 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
877 ; CHECK-NEXT: ret i1 [[CMP]]
879 %uge.neg1 = fcmp uge float %arg, -1.0
880 call void @llvm.assume(i1 %uge.neg1)
881 %cmp = fcmp ole float %arg, 0.0
885 define i1 @assume_uge_neg1__one_0(float %arg) {
886 ; CHECK-LABEL: define i1 @assume_uge_neg1__one_0(
887 ; CHECK-SAME: float [[ARG:%.*]]) {
888 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
889 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
890 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
891 ; CHECK-NEXT: ret i1 [[CMP]]
893 %uge.neg1 = fcmp uge float %arg, -1.0
894 call void @llvm.assume(i1 %uge.neg1)
895 %cmp = fcmp one float %arg, 0.0
899 define i1 @assume_uge_neg1__ord_0(float %arg) {
900 ; CHECK-LABEL: define i1 @assume_uge_neg1__ord_0(
901 ; CHECK-SAME: float [[ARG:%.*]]) {
902 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
903 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
904 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
905 ; CHECK-NEXT: ret i1 [[CMP]]
907 %uge.neg1 = fcmp uge float %arg, -1.0
908 call void @llvm.assume(i1 %uge.neg1)
909 %cmp = fcmp ord float %arg, 0.0
913 define i1 @assume_uge_neg1__ueq_0(float %arg) {
914 ; CHECK-LABEL: define i1 @assume_uge_neg1__ueq_0(
915 ; CHECK-SAME: float [[ARG:%.*]]) {
916 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
917 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
918 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
919 ; CHECK-NEXT: ret i1 [[CMP]]
921 %uge.neg1 = fcmp uge float %arg, -1.0
922 call void @llvm.assume(i1 %uge.neg1)
923 %cmp = fcmp ueq float %arg, 0.0
927 define i1 @assume_uge_neg1__ugt_0(float %arg) {
928 ; CHECK-LABEL: define i1 @assume_uge_neg1__ugt_0(
929 ; CHECK-SAME: float [[ARG:%.*]]) {
930 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
931 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
932 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
933 ; CHECK-NEXT: ret i1 [[CMP]]
935 %uge.neg1 = fcmp uge float %arg, -1.0
936 call void @llvm.assume(i1 %uge.neg1)
937 %cmp = fcmp ugt float %arg, 0.0
941 define i1 @assume_uge_neg1__uge_0(float %arg) {
942 ; CHECK-LABEL: define i1 @assume_uge_neg1__uge_0(
943 ; CHECK-SAME: float [[ARG:%.*]]) {
944 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
945 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
946 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
947 ; CHECK-NEXT: ret i1 [[CMP]]
949 %uge.neg1 = fcmp uge float %arg, -1.0
950 call void @llvm.assume(i1 %uge.neg1)
951 %cmp = fcmp uge float %arg, 0.0
955 define i1 @assume_uge_neg1__ult_0(float %arg) {
956 ; CHECK-LABEL: define i1 @assume_uge_neg1__ult_0(
957 ; CHECK-SAME: float [[ARG:%.*]]) {
958 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
959 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
960 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
961 ; CHECK-NEXT: ret i1 [[CMP]]
963 %uge.neg1 = fcmp uge float %arg, -1.0
964 call void @llvm.assume(i1 %uge.neg1)
965 %cmp = fcmp ult float %arg, 0.0
969 define i1 @assume_uge_neg1__ule_0(float %arg) {
970 ; CHECK-LABEL: define i1 @assume_uge_neg1__ule_0(
971 ; CHECK-SAME: float [[ARG:%.*]]) {
972 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
973 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
974 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
975 ; CHECK-NEXT: ret i1 [[CMP]]
977 %uge.neg1 = fcmp uge float %arg, -1.0
978 call void @llvm.assume(i1 %uge.neg1)
979 %cmp = fcmp ule float %arg, 0.0
983 define i1 @assume_uge_neg1__une_0(float %arg) {
984 ; CHECK-LABEL: define i1 @assume_uge_neg1__une_0(
985 ; CHECK-SAME: float [[ARG:%.*]]) {
986 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
987 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
988 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
989 ; CHECK-NEXT: ret i1 [[CMP]]
991 %uge.neg1 = fcmp uge float %arg, -1.0
992 call void @llvm.assume(i1 %uge.neg1)
993 %cmp = fcmp une float %arg, 0.0
997 define i1 @assume_uge_neg1__uno_0(float %arg) {
998 ; CHECK-LABEL: define i1 @assume_uge_neg1__uno_0(
999 ; CHECK-SAME: float [[ARG:%.*]]) {
1000 ; CHECK-NEXT: [[UGE_NEG1:%.*]] = fcmp uge float [[ARG]], -1.000000e+00
1001 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_NEG1]])
1002 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1003 ; CHECK-NEXT: ret i1 [[CMP]]
1005 %uge.neg1 = fcmp uge float %arg, -1.0
1006 call void @llvm.assume(i1 %uge.neg1)
1007 %cmp = fcmp uno float %arg, 0.0
1011 ; --------------------------------------------------------------------
1012 ; Test assume x u> -1.0 with compares to 0
1013 ; --------------------------------------------------------------------
1015 define i1 @assume_ugt_neg1__oeq_0(float %arg) {
1016 ; CHECK-LABEL: define i1 @assume_ugt_neg1__oeq_0(
1017 ; CHECK-SAME: float [[ARG:%.*]]) {
1018 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1019 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1020 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1021 ; CHECK-NEXT: ret i1 [[CMP]]
1023 %ugt.neg1 = fcmp ugt float %arg, -1.0
1024 call void @llvm.assume(i1 %ugt.neg1)
1025 %cmp = fcmp oeq float %arg, 0.0
1029 define i1 @assume_ugt_neg1__ogt_0(float %arg) {
1030 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ogt_0(
1031 ; CHECK-SAME: float [[ARG:%.*]]) {
1032 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1033 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1034 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1035 ; CHECK-NEXT: ret i1 [[CMP]]
1037 %ugt.neg1 = fcmp ugt float %arg, -1.0
1038 call void @llvm.assume(i1 %ugt.neg1)
1039 %cmp = fcmp ogt float %arg, 0.0
1043 define i1 @assume_ugt_neg1__oge_0(float %arg) {
1044 ; CHECK-LABEL: define i1 @assume_ugt_neg1__oge_0(
1045 ; CHECK-SAME: float [[ARG:%.*]]) {
1046 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1047 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1048 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1049 ; CHECK-NEXT: ret i1 [[CMP]]
1051 %ugt.neg1 = fcmp ugt float %arg, -1.0
1052 call void @llvm.assume(i1 %ugt.neg1)
1053 %cmp = fcmp oge float %arg, 0.0
1057 define i1 @assume_ugt_neg1__olt_0(float %arg) {
1058 ; CHECK-LABEL: define i1 @assume_ugt_neg1__olt_0(
1059 ; CHECK-SAME: float [[ARG:%.*]]) {
1060 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1061 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1062 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1063 ; CHECK-NEXT: ret i1 [[CMP]]
1065 %ugt.neg1 = fcmp ugt float %arg, -1.0
1066 call void @llvm.assume(i1 %ugt.neg1)
1067 %cmp = fcmp olt float %arg, 0.0
1071 define i1 @assume_ugt_neg1__ole_0(float %arg) {
1072 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ole_0(
1073 ; CHECK-SAME: float [[ARG:%.*]]) {
1074 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1075 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1076 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1077 ; CHECK-NEXT: ret i1 [[CMP]]
1079 %ugt.neg1 = fcmp ugt float %arg, -1.0
1080 call void @llvm.assume(i1 %ugt.neg1)
1081 %cmp = fcmp ole float %arg, 0.0
1085 define i1 @assume_ugt_neg1__one_0(float %arg) {
1086 ; CHECK-LABEL: define i1 @assume_ugt_neg1__one_0(
1087 ; CHECK-SAME: float [[ARG:%.*]]) {
1088 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1089 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1090 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1091 ; CHECK-NEXT: ret i1 [[CMP]]
1093 %ugt.neg1 = fcmp ugt float %arg, -1.0
1094 call void @llvm.assume(i1 %ugt.neg1)
1095 %cmp = fcmp one float %arg, 0.0
1099 define i1 @assume_ugt_neg1__ord_0(float %arg) {
1100 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ord_0(
1101 ; CHECK-SAME: float [[ARG:%.*]]) {
1102 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1103 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1104 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1105 ; CHECK-NEXT: ret i1 [[CMP]]
1107 %ugt.neg1 = fcmp ugt float %arg, -1.0
1108 call void @llvm.assume(i1 %ugt.neg1)
1109 %cmp = fcmp ord float %arg, 0.0
1113 define i1 @assume_ugt_neg1__ueq_0(float %arg) {
1114 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ueq_0(
1115 ; CHECK-SAME: float [[ARG:%.*]]) {
1116 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1117 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1118 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1119 ; CHECK-NEXT: ret i1 [[CMP]]
1121 %ugt.neg1 = fcmp ugt float %arg, -1.0
1122 call void @llvm.assume(i1 %ugt.neg1)
1123 %cmp = fcmp ueq float %arg, 0.0
1127 define i1 @assume_ugt_neg1__ugt_0(float %arg) {
1128 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ugt_0(
1129 ; CHECK-SAME: float [[ARG:%.*]]) {
1130 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1131 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1132 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1133 ; CHECK-NEXT: ret i1 [[CMP]]
1135 %ugt.neg1 = fcmp ugt float %arg, -1.0
1136 call void @llvm.assume(i1 %ugt.neg1)
1137 %cmp = fcmp ugt float %arg, 0.0
1141 define i1 @assume_ugt_neg1__uge_0(float %arg) {
1142 ; CHECK-LABEL: define i1 @assume_ugt_neg1__uge_0(
1143 ; CHECK-SAME: float [[ARG:%.*]]) {
1144 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1145 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1146 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1147 ; CHECK-NEXT: ret i1 [[CMP]]
1149 %ugt.neg1 = fcmp ugt float %arg, -1.0
1150 call void @llvm.assume(i1 %ugt.neg1)
1151 %cmp = fcmp uge float %arg, 0.0
1155 define i1 @assume_ugt_neg1__ult_0(float %arg) {
1156 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ult_0(
1157 ; CHECK-SAME: float [[ARG:%.*]]) {
1158 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1159 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1160 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1161 ; CHECK-NEXT: ret i1 [[CMP]]
1163 %ugt.neg1 = fcmp ugt float %arg, -1.0
1164 call void @llvm.assume(i1 %ugt.neg1)
1165 %cmp = fcmp ult float %arg, 0.0
1169 define i1 @assume_ugt_neg1__ule_0(float %arg) {
1170 ; CHECK-LABEL: define i1 @assume_ugt_neg1__ule_0(
1171 ; CHECK-SAME: float [[ARG:%.*]]) {
1172 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1173 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1174 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1175 ; CHECK-NEXT: ret i1 [[CMP]]
1177 %ugt.neg1 = fcmp ugt float %arg, -1.0
1178 call void @llvm.assume(i1 %ugt.neg1)
1179 %cmp = fcmp ule float %arg, 0.0
1183 define i1 @assume_ugt_neg1__une_0(float %arg) {
1184 ; CHECK-LABEL: define i1 @assume_ugt_neg1__une_0(
1185 ; CHECK-SAME: float [[ARG:%.*]]) {
1186 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1187 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1188 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1189 ; CHECK-NEXT: ret i1 [[CMP]]
1191 %ugt.neg1 = fcmp ugt float %arg, -1.0
1192 call void @llvm.assume(i1 %ugt.neg1)
1193 %cmp = fcmp une float %arg, 0.0
1197 define i1 @assume_ugt_neg1__uno_0(float %arg) {
1198 ; CHECK-LABEL: define i1 @assume_ugt_neg1__uno_0(
1199 ; CHECK-SAME: float [[ARG:%.*]]) {
1200 ; CHECK-NEXT: [[UGT_NEG1:%.*]] = fcmp ugt float [[ARG]], -1.000000e+00
1201 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_NEG1]])
1202 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1203 ; CHECK-NEXT: ret i1 [[CMP]]
1205 %ugt.neg1 = fcmp ugt float %arg, -1.0
1206 call void @llvm.assume(i1 %ugt.neg1)
1207 %cmp = fcmp uno float %arg, 0.0
1211 ; --------------------------------------------------------------------
1212 ; Test assume x u<= -1.0 with compares to 0
1213 ; --------------------------------------------------------------------
1215 define i1 @assume_ule_neg1__oeq_0(float %arg) {
1216 ; CHECK-LABEL: define i1 @assume_ule_neg1__oeq_0(
1217 ; CHECK-SAME: float [[ARG:%.*]]) {
1218 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1219 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1220 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1221 ; CHECK-NEXT: ret i1 [[CMP]]
1223 %ule.neg1 = fcmp ule float %arg, -1.0
1224 call void @llvm.assume(i1 %ule.neg1)
1225 %cmp = fcmp oeq float %arg, 0.0
1229 define i1 @assume_ule_neg1__ogt_0(float %arg) {
1230 ; CHECK-LABEL: define i1 @assume_ule_neg1__ogt_0(
1231 ; CHECK-SAME: float [[ARG:%.*]]) {
1232 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1233 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1234 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1235 ; CHECK-NEXT: ret i1 [[CMP]]
1237 %ule.neg1 = fcmp ule float %arg, -1.0
1238 call void @llvm.assume(i1 %ule.neg1)
1239 %cmp = fcmp ogt float %arg, 0.0
1243 define i1 @assume_ule_neg1__oge_0(float %arg) {
1244 ; CHECK-LABEL: define i1 @assume_ule_neg1__oge_0(
1245 ; CHECK-SAME: float [[ARG:%.*]]) {
1246 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1247 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1248 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1249 ; CHECK-NEXT: ret i1 [[CMP]]
1251 %ule.neg1 = fcmp ule float %arg, -1.0
1252 call void @llvm.assume(i1 %ule.neg1)
1253 %cmp = fcmp oge float %arg, 0.0
1257 define i1 @assume_ule_neg1__olt_0(float %arg) {
1258 ; CHECK-LABEL: define i1 @assume_ule_neg1__olt_0(
1259 ; CHECK-SAME: float [[ARG:%.*]]) {
1260 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1261 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1262 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1263 ; CHECK-NEXT: ret i1 [[CMP]]
1265 %ule.neg1 = fcmp ule float %arg, -1.0
1266 call void @llvm.assume(i1 %ule.neg1)
1267 %cmp = fcmp olt float %arg, 0.0
1271 define i1 @assume_ule_neg1__ole_0(float %arg) {
1272 ; CHECK-LABEL: define i1 @assume_ule_neg1__ole_0(
1273 ; CHECK-SAME: float [[ARG:%.*]]) {
1274 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1275 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1276 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1277 ; CHECK-NEXT: ret i1 [[CMP]]
1279 %ule.neg1 = fcmp ule float %arg, -1.0
1280 call void @llvm.assume(i1 %ule.neg1)
1281 %cmp = fcmp ole float %arg, 0.0
1285 define i1 @assume_ule_neg1__one_0(float %arg) {
1286 ; CHECK-LABEL: define i1 @assume_ule_neg1__one_0(
1287 ; CHECK-SAME: float [[ARG:%.*]]) {
1288 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1289 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1290 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1291 ; CHECK-NEXT: ret i1 [[CMP]]
1293 %ule.neg1 = fcmp ule float %arg, -1.0
1294 call void @llvm.assume(i1 %ule.neg1)
1295 %cmp = fcmp one float %arg, 0.0
1299 define i1 @assume_ule_neg1__ord_0(float %arg) {
1300 ; CHECK-LABEL: define i1 @assume_ule_neg1__ord_0(
1301 ; CHECK-SAME: float [[ARG:%.*]]) {
1302 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1303 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1304 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1305 ; CHECK-NEXT: ret i1 [[CMP]]
1307 %ule.neg1 = fcmp ule float %arg, -1.0
1308 call void @llvm.assume(i1 %ule.neg1)
1309 %cmp = fcmp ord float %arg, 0.0
1313 define i1 @assume_ule_neg1__ueq_0(float %arg) {
1314 ; CHECK-LABEL: define i1 @assume_ule_neg1__ueq_0(
1315 ; CHECK-SAME: float [[ARG:%.*]]) {
1316 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1317 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1318 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1319 ; CHECK-NEXT: ret i1 [[CMP]]
1321 %ule.neg1 = fcmp ule float %arg, -1.0
1322 call void @llvm.assume(i1 %ule.neg1)
1323 %cmp = fcmp ueq float %arg, 0.0
1327 define i1 @assume_ule_neg1__ugt_0(float %arg) {
1328 ; CHECK-LABEL: define i1 @assume_ule_neg1__ugt_0(
1329 ; CHECK-SAME: float [[ARG:%.*]]) {
1330 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1331 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1332 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1333 ; CHECK-NEXT: ret i1 [[CMP]]
1335 %ule.neg1 = fcmp ule float %arg, -1.0
1336 call void @llvm.assume(i1 %ule.neg1)
1337 %cmp = fcmp ugt float %arg, 0.0
1341 define i1 @assume_ule_neg1__uge_0(float %arg) {
1342 ; CHECK-LABEL: define i1 @assume_ule_neg1__uge_0(
1343 ; CHECK-SAME: float [[ARG:%.*]]) {
1344 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1345 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1346 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1347 ; CHECK-NEXT: ret i1 [[CMP]]
1349 %ule.neg1 = fcmp ule float %arg, -1.0
1350 call void @llvm.assume(i1 %ule.neg1)
1351 %cmp = fcmp uge float %arg, 0.0
1355 define i1 @assume_ule_neg1__ult_0(float %arg) {
1356 ; CHECK-LABEL: define i1 @assume_ule_neg1__ult_0(
1357 ; CHECK-SAME: float [[ARG:%.*]]) {
1358 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1359 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1360 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1361 ; CHECK-NEXT: ret i1 [[CMP]]
1363 %ule.neg1 = fcmp ule float %arg, -1.0
1364 call void @llvm.assume(i1 %ule.neg1)
1365 %cmp = fcmp ult float %arg, 0.0
1369 define i1 @assume_ule_neg1__ule_0(float %arg) {
1370 ; CHECK-LABEL: define i1 @assume_ule_neg1__ule_0(
1371 ; CHECK-SAME: float [[ARG:%.*]]) {
1372 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1373 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1374 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1375 ; CHECK-NEXT: ret i1 [[CMP]]
1377 %ule.neg1 = fcmp ule float %arg, -1.0
1378 call void @llvm.assume(i1 %ule.neg1)
1379 %cmp = fcmp ule float %arg, 0.0
1383 define i1 @assume_ule_neg1__une_0(float %arg) {
1384 ; CHECK-LABEL: define i1 @assume_ule_neg1__une_0(
1385 ; CHECK-SAME: float [[ARG:%.*]]) {
1386 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1387 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1388 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1389 ; CHECK-NEXT: ret i1 [[CMP]]
1391 %ule.neg1 = fcmp ule float %arg, -1.0
1392 call void @llvm.assume(i1 %ule.neg1)
1393 %cmp = fcmp une float %arg, 0.0
1397 define i1 @assume_ule_neg1__uno_0(float %arg) {
1398 ; CHECK-LABEL: define i1 @assume_ule_neg1__uno_0(
1399 ; CHECK-SAME: float [[ARG:%.*]]) {
1400 ; CHECK-NEXT: [[ULE_NEG1:%.*]] = fcmp ule float [[ARG]], -1.000000e+00
1401 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULE_NEG1]])
1402 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1403 ; CHECK-NEXT: ret i1 [[CMP]]
1405 %ule.neg1 = fcmp ule float %arg, -1.0
1406 call void @llvm.assume(i1 %ule.neg1)
1407 %cmp = fcmp uno float %arg, 0.0
1411 ; --------------------------------------------------------------------
1412 ; Test assume x u< -1.0 with compares to 0
1413 ; --------------------------------------------------------------------
1415 define i1 @assume_ult_neg1__oeq_0(float %arg) {
1416 ; CHECK-LABEL: define i1 @assume_ult_neg1__oeq_0(
1417 ; CHECK-SAME: float [[ARG:%.*]]) {
1418 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1419 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1420 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1421 ; CHECK-NEXT: ret i1 [[CMP]]
1423 %ult.neg1 = fcmp ult float %arg, -1.0
1424 call void @llvm.assume(i1 %ult.neg1)
1425 %cmp = fcmp oeq float %arg, 0.0
1429 define i1 @assume_ult_neg1__ogt_0(float %arg) {
1430 ; CHECK-LABEL: define i1 @assume_ult_neg1__ogt_0(
1431 ; CHECK-SAME: float [[ARG:%.*]]) {
1432 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1433 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1434 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1435 ; CHECK-NEXT: ret i1 [[CMP]]
1437 %ult.neg1 = fcmp ult float %arg, -1.0
1438 call void @llvm.assume(i1 %ult.neg1)
1439 %cmp = fcmp ogt float %arg, 0.0
1443 define i1 @assume_ult_neg1__oge_0(float %arg) {
1444 ; CHECK-LABEL: define i1 @assume_ult_neg1__oge_0(
1445 ; CHECK-SAME: float [[ARG:%.*]]) {
1446 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1447 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1448 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1449 ; CHECK-NEXT: ret i1 [[CMP]]
1451 %ult.neg1 = fcmp ult float %arg, -1.0
1452 call void @llvm.assume(i1 %ult.neg1)
1453 %cmp = fcmp oge float %arg, 0.0
1457 define i1 @assume_ult_neg1__olt_0(float %arg) {
1458 ; CHECK-LABEL: define i1 @assume_ult_neg1__olt_0(
1459 ; CHECK-SAME: float [[ARG:%.*]]) {
1460 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1461 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1462 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1463 ; CHECK-NEXT: ret i1 [[CMP]]
1465 %ult.neg1 = fcmp ult float %arg, -1.0
1466 call void @llvm.assume(i1 %ult.neg1)
1467 %cmp = fcmp olt float %arg, 0.0
1471 define i1 @assume_ult_neg1__ole_0(float %arg) {
1472 ; CHECK-LABEL: define i1 @assume_ult_neg1__ole_0(
1473 ; CHECK-SAME: float [[ARG:%.*]]) {
1474 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1475 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1476 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1477 ; CHECK-NEXT: ret i1 [[CMP]]
1479 %ult.neg1 = fcmp ult float %arg, -1.0
1480 call void @llvm.assume(i1 %ult.neg1)
1481 %cmp = fcmp ole float %arg, 0.0
1485 define i1 @assume_ult_neg1__one_0(float %arg) {
1486 ; CHECK-LABEL: define i1 @assume_ult_neg1__one_0(
1487 ; CHECK-SAME: float [[ARG:%.*]]) {
1488 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1489 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1490 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1491 ; CHECK-NEXT: ret i1 [[CMP]]
1493 %ult.neg1 = fcmp ult float %arg, -1.0
1494 call void @llvm.assume(i1 %ult.neg1)
1495 %cmp = fcmp one float %arg, 0.0
1499 define i1 @assume_ult_neg1__ord_0(float %arg) {
1500 ; CHECK-LABEL: define i1 @assume_ult_neg1__ord_0(
1501 ; CHECK-SAME: float [[ARG:%.*]]) {
1502 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1503 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1504 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1505 ; CHECK-NEXT: ret i1 [[CMP]]
1507 %ult.neg1 = fcmp ult float %arg, -1.0
1508 call void @llvm.assume(i1 %ult.neg1)
1509 %cmp = fcmp ord float %arg, 0.0
1513 define i1 @assume_ult_neg1__ueq_0(float %arg) {
1514 ; CHECK-LABEL: define i1 @assume_ult_neg1__ueq_0(
1515 ; CHECK-SAME: float [[ARG:%.*]]) {
1516 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1517 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1518 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1519 ; CHECK-NEXT: ret i1 [[CMP]]
1521 %ult.neg1 = fcmp ult float %arg, -1.0
1522 call void @llvm.assume(i1 %ult.neg1)
1523 %cmp = fcmp ueq float %arg, 0.0
1527 define i1 @assume_ult_neg1__ugt_0(float %arg) {
1528 ; CHECK-LABEL: define i1 @assume_ult_neg1__ugt_0(
1529 ; CHECK-SAME: float [[ARG:%.*]]) {
1530 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1531 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1532 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1533 ; CHECK-NEXT: ret i1 [[CMP]]
1535 %ult.neg1 = fcmp ult float %arg, -1.0
1536 call void @llvm.assume(i1 %ult.neg1)
1537 %cmp = fcmp ugt float %arg, 0.0
1541 define i1 @assume_ult_neg1__uge_0(float %arg) {
1542 ; CHECK-LABEL: define i1 @assume_ult_neg1__uge_0(
1543 ; CHECK-SAME: float [[ARG:%.*]]) {
1544 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1545 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1546 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1547 ; CHECK-NEXT: ret i1 [[CMP]]
1549 %ult.neg1 = fcmp ult float %arg, -1.0
1550 call void @llvm.assume(i1 %ult.neg1)
1551 %cmp = fcmp uge float %arg, 0.0
1555 define i1 @assume_ult_neg1__ult_0(float %arg) {
1556 ; CHECK-LABEL: define i1 @assume_ult_neg1__ult_0(
1557 ; CHECK-SAME: float [[ARG:%.*]]) {
1558 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1559 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1560 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1561 ; CHECK-NEXT: ret i1 [[CMP]]
1563 %ult.neg1 = fcmp ult float %arg, -1.0
1564 call void @llvm.assume(i1 %ult.neg1)
1565 %cmp = fcmp ult float %arg, 0.0
1569 define i1 @assume_ult_neg1__ule_0(float %arg) {
1570 ; CHECK-LABEL: define i1 @assume_ult_neg1__ule_0(
1571 ; CHECK-SAME: float [[ARG:%.*]]) {
1572 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1573 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1574 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1575 ; CHECK-NEXT: ret i1 [[CMP]]
1577 %ult.neg1 = fcmp ult float %arg, -1.0
1578 call void @llvm.assume(i1 %ult.neg1)
1579 %cmp = fcmp ule float %arg, 0.0
1583 define i1 @assume_ult_neg1__une_0(float %arg) {
1584 ; CHECK-LABEL: define i1 @assume_ult_neg1__une_0(
1585 ; CHECK-SAME: float [[ARG:%.*]]) {
1586 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1587 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1588 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1589 ; CHECK-NEXT: ret i1 [[CMP]]
1591 %ult.neg1 = fcmp ult float %arg, -1.0
1592 call void @llvm.assume(i1 %ult.neg1)
1593 %cmp = fcmp une float %arg, 0.0
1597 define i1 @assume_ult_neg1__uno_0(float %arg) {
1598 ; CHECK-LABEL: define i1 @assume_ult_neg1__uno_0(
1599 ; CHECK-SAME: float [[ARG:%.*]]) {
1600 ; CHECK-NEXT: [[ULT_NEG1:%.*]] = fcmp ult float [[ARG]], -1.000000e+00
1601 ; CHECK-NEXT: call void @llvm.assume(i1 [[ULT_NEG1]])
1602 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1603 ; CHECK-NEXT: ret i1 [[CMP]]
1605 %ult.neg1 = fcmp ult float %arg, -1.0
1606 call void @llvm.assume(i1 %ult.neg1)
1607 %cmp = fcmp uno float %arg, 0.0
1611 ; --------------------------------------------------------------------
1612 ; Test assume x == 0 with compares to 0
1613 ; --------------------------------------------------------------------
1615 define i1 @assume_oeq_0__oeq_0(float %arg) {
1616 ; CHECK-LABEL: define i1 @assume_oeq_0__oeq_0(
1617 ; CHECK-SAME: float [[ARG:%.*]]) {
1618 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1619 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1620 ; CHECK-NEXT: ret i1 true
1622 %oeq.0 = fcmp oeq float %arg, 0.0
1623 call void @llvm.assume(i1 %oeq.0)
1624 %cmp = fcmp oeq float %arg, 0.0
1628 define i1 @assume_oeq_0__ueq_0(float %arg) {
1629 ; CHECK-LABEL: define i1 @assume_oeq_0__ueq_0(
1630 ; CHECK-SAME: float [[ARG:%.*]]) {
1631 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1632 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1633 ; CHECK-NEXT: ret i1 true
1635 %oeq.0 = fcmp oeq float %arg, 0.0
1636 call void @llvm.assume(i1 %oeq.0)
1637 %cmp = fcmp ueq float %arg, 0.0
1641 define i1 @assume_one_0__oeq_0(float %arg) {
1642 ; CHECK-LABEL: define i1 @assume_one_0__oeq_0(
1643 ; CHECK-SAME: float [[ARG:%.*]]) {
1644 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1645 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1646 ; CHECK-NEXT: ret i1 false
1648 %oeq.0 = fcmp one float %arg, 0.0
1649 call void @llvm.assume(i1 %oeq.0)
1650 %cmp = fcmp oeq float %arg, 0.0
1654 define i1 @assume_ueq_0__oeq_0(float %arg) {
1655 ; CHECK-LABEL: define i1 @assume_ueq_0__oeq_0(
1656 ; CHECK-SAME: float [[ARG:%.*]]) {
1657 ; CHECK-NEXT: [[OEQ_0:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1658 ; CHECK-NEXT: call void @llvm.assume(i1 [[OEQ_0]])
1659 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1660 ; CHECK-NEXT: ret i1 [[CMP]]
1662 %oeq.0 = fcmp ueq float %arg, 0.0
1663 call void @llvm.assume(i1 %oeq.0)
1664 %cmp = fcmp oeq float %arg, 0.0
1668 define i1 @assume_ueq_0__ueq_0(float %arg) {
1669 ; CHECK-LABEL: define i1 @assume_ueq_0__ueq_0(
1670 ; CHECK-SAME: float [[ARG:%.*]]) {
1671 ; CHECK-NEXT: [[UEQ_0:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1672 ; CHECK-NEXT: call void @llvm.assume(i1 [[UEQ_0]])
1673 ; CHECK-NEXT: ret i1 true
1675 %ueq.0 = fcmp ueq float %arg, 0.0
1676 call void @llvm.assume(i1 %ueq.0)
1677 %cmp = fcmp ueq float %arg, 0.0
1681 define i1 @assume_one_0__ueq_0(float %arg) {
1682 ; CHECK-LABEL: define i1 @assume_one_0__ueq_0(
1683 ; CHECK-SAME: float [[ARG:%.*]]) {
1684 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1685 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1686 ; CHECK-NEXT: ret i1 false
1688 %one.0 = fcmp one float %arg, 0.0
1689 call void @llvm.assume(i1 %one.0)
1690 %cmp = fcmp ueq float %arg, 0.0
1694 define i1 @assume_one_0__one_0(float %arg) {
1695 ; CHECK-LABEL: define i1 @assume_one_0__one_0(
1696 ; CHECK-SAME: float [[ARG:%.*]]) {
1697 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1698 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1699 ; CHECK-NEXT: ret i1 true
1701 %one.0 = fcmp one float %arg, 0.0
1702 call void @llvm.assume(i1 %one.0)
1703 %cmp = fcmp one float %arg, 0.0
1707 define i1 @assume_une_0__oeq_0(float %arg) {
1708 ; CHECK-LABEL: define i1 @assume_une_0__oeq_0(
1709 ; CHECK-SAME: float [[ARG:%.*]]) {
1710 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1711 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1712 ; CHECK-NEXT: ret i1 false
1714 %one.0 = fcmp une float %arg, 0.0
1715 call void @llvm.assume(i1 %one.0)
1716 %cmp = fcmp oeq float %arg, 0.0
1720 define i1 @assume_une_0__one_0(float %arg) {
1721 ; CHECK-LABEL: define i1 @assume_une_0__one_0(
1722 ; CHECK-SAME: float [[ARG:%.*]]) {
1723 ; CHECK-NEXT: [[ONE_0:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1724 ; CHECK-NEXT: call void @llvm.assume(i1 [[ONE_0]])
1725 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1726 ; CHECK-NEXT: ret i1 [[CMP]]
1728 %one.0 = fcmp une float %arg, 0.0
1729 call void @llvm.assume(i1 %one.0)
1730 %cmp = fcmp one float %arg, 0.0
1734 ; --------------------------------------------------------------------
1735 ; Test assume x < 1.0 with compares to 0
1736 ; --------------------------------------------------------------------
1738 define i1 @assume_olt_pos1__oeq_0(float %arg) {
1739 ; CHECK-LABEL: define i1 @assume_olt_pos1__oeq_0(
1740 ; CHECK-SAME: float [[ARG:%.*]]) {
1741 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1742 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1743 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1744 ; CHECK-NEXT: ret i1 [[CMP]]
1746 %olt.pos1 = fcmp olt float %arg, 1.0
1747 call void @llvm.assume(i1 %olt.pos1)
1748 %cmp = fcmp oeq float %arg, 0.0
1752 define i1 @assume_olt_pos1__ogt_0(float %arg) {
1753 ; CHECK-LABEL: define i1 @assume_olt_pos1__ogt_0(
1754 ; CHECK-SAME: float [[ARG:%.*]]) {
1755 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1756 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1757 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1758 ; CHECK-NEXT: ret i1 [[CMP]]
1760 %olt.pos1 = fcmp olt float %arg, 1.0
1761 call void @llvm.assume(i1 %olt.pos1)
1762 %cmp = fcmp ogt float %arg, 0.0
1766 define i1 @assume_olt_pos1__oge_0(float %arg) {
1767 ; CHECK-LABEL: define i1 @assume_olt_pos1__oge_0(
1768 ; CHECK-SAME: float [[ARG:%.*]]) {
1769 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1770 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1771 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1772 ; CHECK-NEXT: ret i1 [[CMP]]
1774 %olt.pos1 = fcmp olt float %arg, 1.0
1775 call void @llvm.assume(i1 %olt.pos1)
1776 %cmp = fcmp oge float %arg, 0.0
1780 define i1 @assume_olt_pos1__olt_0(float %arg) {
1781 ; CHECK-LABEL: define i1 @assume_olt_pos1__olt_0(
1782 ; CHECK-SAME: float [[ARG:%.*]]) {
1783 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1784 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1785 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1786 ; CHECK-NEXT: ret i1 [[CMP]]
1788 %olt.pos1 = fcmp olt float %arg, 1.0
1789 call void @llvm.assume(i1 %olt.pos1)
1790 %cmp = fcmp olt float %arg, 0.0
1794 define i1 @assume_olt_pos1__ole_0(float %arg) {
1795 ; CHECK-LABEL: define i1 @assume_olt_pos1__ole_0(
1796 ; CHECK-SAME: float [[ARG:%.*]]) {
1797 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1798 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1799 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
1800 ; CHECK-NEXT: ret i1 [[CMP]]
1802 %olt.pos1 = fcmp olt float %arg, 1.0
1803 call void @llvm.assume(i1 %olt.pos1)
1804 %cmp = fcmp ole float %arg, 0.0
1808 define i1 @assume_olt_pos1__one_0(float %arg) {
1809 ; CHECK-LABEL: define i1 @assume_olt_pos1__one_0(
1810 ; CHECK-SAME: float [[ARG:%.*]]) {
1811 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1812 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1813 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
1814 ; CHECK-NEXT: ret i1 [[CMP]]
1816 %olt.pos1 = fcmp olt float %arg, 1.0
1817 call void @llvm.assume(i1 %olt.pos1)
1818 %cmp = fcmp one float %arg, 0.0
1822 define i1 @assume_olt_pos1__ord_0(float %arg) {
1823 ; CHECK-LABEL: define i1 @assume_olt_pos1__ord_0(
1824 ; CHECK-SAME: float [[ARG:%.*]]) {
1825 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1826 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1827 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
1828 ; CHECK-NEXT: ret i1 [[CMP]]
1830 %olt.pos1 = fcmp olt float %arg, 1.0
1831 call void @llvm.assume(i1 %olt.pos1)
1832 %cmp = fcmp ord float %arg, 0.0
1836 define i1 @assume_olt_pos1__ueq_0(float %arg) {
1837 ; CHECK-LABEL: define i1 @assume_olt_pos1__ueq_0(
1838 ; CHECK-SAME: float [[ARG:%.*]]) {
1839 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1840 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1841 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
1842 ; CHECK-NEXT: ret i1 [[CMP]]
1844 %olt.pos1 = fcmp olt float %arg, 1.0
1845 call void @llvm.assume(i1 %olt.pos1)
1846 %cmp = fcmp ueq float %arg, 0.0
1850 define i1 @assume_olt_pos1__ugt_0(float %arg) {
1851 ; CHECK-LABEL: define i1 @assume_olt_pos1__ugt_0(
1852 ; CHECK-SAME: float [[ARG:%.*]]) {
1853 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1854 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1855 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
1856 ; CHECK-NEXT: ret i1 [[CMP]]
1858 %olt.pos1 = fcmp olt float %arg, 1.0
1859 call void @llvm.assume(i1 %olt.pos1)
1860 %cmp = fcmp ugt float %arg, 0.0
1864 define i1 @assume_olt_pos1__uge_0(float %arg) {
1865 ; CHECK-LABEL: define i1 @assume_olt_pos1__uge_0(
1866 ; CHECK-SAME: float [[ARG:%.*]]) {
1867 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1868 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1869 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
1870 ; CHECK-NEXT: ret i1 [[CMP]]
1872 %olt.pos1 = fcmp olt float %arg, 1.0
1873 call void @llvm.assume(i1 %olt.pos1)
1874 %cmp = fcmp uge float %arg, 0.0
1878 define i1 @assume_olt_pos1__ult_0(float %arg) {
1879 ; CHECK-LABEL: define i1 @assume_olt_pos1__ult_0(
1880 ; CHECK-SAME: float [[ARG:%.*]]) {
1881 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1882 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1883 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
1884 ; CHECK-NEXT: ret i1 [[CMP]]
1886 %olt.pos1 = fcmp olt float %arg, 1.0
1887 call void @llvm.assume(i1 %olt.pos1)
1888 %cmp = fcmp ult float %arg, 0.0
1892 define i1 @assume_olt_pos1__ule_0(float %arg) {
1893 ; CHECK-LABEL: define i1 @assume_olt_pos1__ule_0(
1894 ; CHECK-SAME: float [[ARG:%.*]]) {
1895 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1896 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1897 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
1898 ; CHECK-NEXT: ret i1 [[CMP]]
1900 %olt.pos1 = fcmp olt float %arg, 1.0
1901 call void @llvm.assume(i1 %olt.pos1)
1902 %cmp = fcmp ule float %arg, 0.0
1906 define i1 @assume_olt_pos1__une_0(float %arg) {
1907 ; CHECK-LABEL: define i1 @assume_olt_pos1__une_0(
1908 ; CHECK-SAME: float [[ARG:%.*]]) {
1909 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1910 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1911 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
1912 ; CHECK-NEXT: ret i1 [[CMP]]
1914 %olt.pos1 = fcmp olt float %arg, 1.0
1915 call void @llvm.assume(i1 %olt.pos1)
1916 %cmp = fcmp une float %arg, 0.0
1920 define i1 @assume_olt_pos1__uno_0(float %arg) {
1921 ; CHECK-LABEL: define i1 @assume_olt_pos1__uno_0(
1922 ; CHECK-SAME: float [[ARG:%.*]]) {
1923 ; CHECK-NEXT: [[OLT_POS1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
1924 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_POS1]])
1925 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
1926 ; CHECK-NEXT: ret i1 [[CMP]]
1928 %olt.pos1 = fcmp olt float %arg, 1.0
1929 call void @llvm.assume(i1 %olt.pos1)
1930 %cmp = fcmp uno float %arg, 0.0
1934 ; --------------------------------------------------------------------
1935 ; Test assume x <= 1.0 with compares to 0
1936 ; --------------------------------------------------------------------
1938 define i1 @assume_ole_pos1__oeq_0(float %arg) {
1939 ; CHECK-LABEL: define i1 @assume_ole_pos1__oeq_0(
1940 ; CHECK-SAME: float [[ARG:%.*]]) {
1941 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1942 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1943 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
1944 ; CHECK-NEXT: ret i1 [[CMP]]
1946 %ole.pos1 = fcmp ole float %arg, 1.0
1947 call void @llvm.assume(i1 %ole.pos1)
1948 %cmp = fcmp oeq float %arg, 0.0
1952 define i1 @assume_ole_pos1__ogt_0(float %arg) {
1953 ; CHECK-LABEL: define i1 @assume_ole_pos1__ogt_0(
1954 ; CHECK-SAME: float [[ARG:%.*]]) {
1955 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1956 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1957 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
1958 ; CHECK-NEXT: ret i1 [[CMP]]
1960 %ole.pos1 = fcmp ole float %arg, 1.0
1961 call void @llvm.assume(i1 %ole.pos1)
1962 %cmp = fcmp ogt float %arg, 0.0
1966 define i1 @assume_ole_pos1__oge_0(float %arg) {
1967 ; CHECK-LABEL: define i1 @assume_ole_pos1__oge_0(
1968 ; CHECK-SAME: float [[ARG:%.*]]) {
1969 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1970 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1971 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
1972 ; CHECK-NEXT: ret i1 [[CMP]]
1974 %ole.pos1 = fcmp ole float %arg, 1.0
1975 call void @llvm.assume(i1 %ole.pos1)
1976 %cmp = fcmp oge float %arg, 0.0
1980 define i1 @assume_ole_pos1__olt_0(float %arg) {
1981 ; CHECK-LABEL: define i1 @assume_ole_pos1__olt_0(
1982 ; CHECK-SAME: float [[ARG:%.*]]) {
1983 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1984 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1985 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
1986 ; CHECK-NEXT: ret i1 [[CMP]]
1988 %ole.pos1 = fcmp ole float %arg, 1.0
1989 call void @llvm.assume(i1 %ole.pos1)
1990 %cmp = fcmp olt float %arg, 0.0
1994 define i1 @assume_ole_pos1__ole_0(float %arg) {
1995 ; CHECK-LABEL: define i1 @assume_ole_pos1__ole_0(
1996 ; CHECK-SAME: float [[ARG:%.*]]) {
1997 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
1998 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
1999 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2000 ; CHECK-NEXT: ret i1 [[CMP]]
2002 %ole.pos1 = fcmp ole float %arg, 1.0
2003 call void @llvm.assume(i1 %ole.pos1)
2004 %cmp = fcmp ole float %arg, 0.0
2008 define i1 @assume_ole_pos1__one_0(float %arg) {
2009 ; CHECK-LABEL: define i1 @assume_ole_pos1__one_0(
2010 ; CHECK-SAME: float [[ARG:%.*]]) {
2011 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2012 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2013 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2014 ; CHECK-NEXT: ret i1 [[CMP]]
2016 %ole.pos1 = fcmp ole float %arg, 1.0
2017 call void @llvm.assume(i1 %ole.pos1)
2018 %cmp = fcmp one float %arg, 0.0
2022 define i1 @assume_ole_pos1__ord_0(float %arg) {
2023 ; CHECK-LABEL: define i1 @assume_ole_pos1__ord_0(
2024 ; CHECK-SAME: float [[ARG:%.*]]) {
2025 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2026 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2027 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2028 ; CHECK-NEXT: ret i1 [[CMP]]
2030 %ole.pos1 = fcmp ole float %arg, 1.0
2031 call void @llvm.assume(i1 %ole.pos1)
2032 %cmp = fcmp ord float %arg, 0.0
2036 define i1 @assume_ole_pos1__ueq_0(float %arg) {
2037 ; CHECK-LABEL: define i1 @assume_ole_pos1__ueq_0(
2038 ; CHECK-SAME: float [[ARG:%.*]]) {
2039 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2040 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2041 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2042 ; CHECK-NEXT: ret i1 [[CMP]]
2044 %ole.pos1 = fcmp ole float %arg, 1.0
2045 call void @llvm.assume(i1 %ole.pos1)
2046 %cmp = fcmp ueq float %arg, 0.0
2050 define i1 @assume_ole_pos1__ugt_0(float %arg) {
2051 ; CHECK-LABEL: define i1 @assume_ole_pos1__ugt_0(
2052 ; CHECK-SAME: float [[ARG:%.*]]) {
2053 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2054 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2055 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2056 ; CHECK-NEXT: ret i1 [[CMP]]
2058 %ole.pos1 = fcmp ole float %arg, 1.0
2059 call void @llvm.assume(i1 %ole.pos1)
2060 %cmp = fcmp ugt float %arg, 0.0
2064 define i1 @assume_ole_pos1__uge_0(float %arg) {
2065 ; CHECK-LABEL: define i1 @assume_ole_pos1__uge_0(
2066 ; CHECK-SAME: float [[ARG:%.*]]) {
2067 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2068 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2069 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2070 ; CHECK-NEXT: ret i1 [[CMP]]
2072 %ole.pos1 = fcmp ole float %arg, 1.0
2073 call void @llvm.assume(i1 %ole.pos1)
2074 %cmp = fcmp uge float %arg, 0.0
2078 define i1 @assume_ole_pos1__ult_0(float %arg) {
2079 ; CHECK-LABEL: define i1 @assume_ole_pos1__ult_0(
2080 ; CHECK-SAME: float [[ARG:%.*]]) {
2081 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2082 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2083 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2084 ; CHECK-NEXT: ret i1 [[CMP]]
2086 %ole.pos1 = fcmp ole float %arg, 1.0
2087 call void @llvm.assume(i1 %ole.pos1)
2088 %cmp = fcmp ult float %arg, 0.0
2092 define i1 @assume_ole_pos1__ule_0(float %arg) {
2093 ; CHECK-LABEL: define i1 @assume_ole_pos1__ule_0(
2094 ; CHECK-SAME: float [[ARG:%.*]]) {
2095 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2096 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2097 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2098 ; CHECK-NEXT: ret i1 [[CMP]]
2100 %ole.pos1 = fcmp ole float %arg, 1.0
2101 call void @llvm.assume(i1 %ole.pos1)
2102 %cmp = fcmp ule float %arg, 0.0
2106 define i1 @assume_ole_pos1__une_0(float %arg) {
2107 ; CHECK-LABEL: define i1 @assume_ole_pos1__une_0(
2108 ; CHECK-SAME: float [[ARG:%.*]]) {
2109 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2110 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2111 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2112 ; CHECK-NEXT: ret i1 [[CMP]]
2114 %ole.pos1 = fcmp ole float %arg, 1.0
2115 call void @llvm.assume(i1 %ole.pos1)
2116 %cmp = fcmp une float %arg, 0.0
2120 define i1 @assume_ole_pos1__uno_0(float %arg) {
2121 ; CHECK-LABEL: define i1 @assume_ole_pos1__uno_0(
2122 ; CHECK-SAME: float [[ARG:%.*]]) {
2123 ; CHECK-NEXT: [[OLE_POS1:%.*]] = fcmp ole float [[ARG]], 1.000000e+00
2124 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLE_POS1]])
2125 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2126 ; CHECK-NEXT: ret i1 [[CMP]]
2128 %ole.pos1 = fcmp ole float %arg, 1.0
2129 call void @llvm.assume(i1 %ole.pos1)
2130 %cmp = fcmp uno float %arg, 0.0
2134 ; --------------------------------------------------------------------
2135 ; Test assume x > 1.0 with compares to 0
2136 ; --------------------------------------------------------------------
2138 define i1 @assume_ogt_pos1__oeq_0(float %arg) {
2139 ; CHECK-LABEL: define i1 @assume_ogt_pos1__oeq_0(
2140 ; CHECK-SAME: float [[ARG:%.*]]) {
2141 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2142 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2143 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2144 ; CHECK-NEXT: ret i1 [[CMP]]
2146 %ogt.pos1 = fcmp ogt float %arg, 1.0
2147 call void @llvm.assume(i1 %ogt.pos1)
2148 %cmp = fcmp oeq float %arg, 0.0
2152 define i1 @assume_ogt_pos1__ogt_0(float %arg) {
2153 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ogt_0(
2154 ; CHECK-SAME: float [[ARG:%.*]]) {
2155 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2156 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2157 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2158 ; CHECK-NEXT: ret i1 [[CMP]]
2160 %ogt.pos1 = fcmp ogt float %arg, 1.0
2161 call void @llvm.assume(i1 %ogt.pos1)
2162 %cmp = fcmp ogt float %arg, 0.0
2166 define i1 @assume_ogt_pos1__oge_0(float %arg) {
2167 ; CHECK-LABEL: define i1 @assume_ogt_pos1__oge_0(
2168 ; CHECK-SAME: float [[ARG:%.*]]) {
2169 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2170 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2171 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2172 ; CHECK-NEXT: ret i1 [[CMP]]
2174 %ogt.pos1 = fcmp ogt float %arg, 1.0
2175 call void @llvm.assume(i1 %ogt.pos1)
2176 %cmp = fcmp oge float %arg, 0.0
2180 define i1 @assume_ogt_pos1__olt_0(float %arg) {
2181 ; CHECK-LABEL: define i1 @assume_ogt_pos1__olt_0(
2182 ; CHECK-SAME: float [[ARG:%.*]]) {
2183 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2184 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2185 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2186 ; CHECK-NEXT: ret i1 [[CMP]]
2188 %ogt.pos1 = fcmp ogt float %arg, 1.0
2189 call void @llvm.assume(i1 %ogt.pos1)
2190 %cmp = fcmp olt float %arg, 0.0
2194 define i1 @assume_ogt_pos1__ole_0(float %arg) {
2195 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ole_0(
2196 ; CHECK-SAME: float [[ARG:%.*]]) {
2197 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2198 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2199 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2200 ; CHECK-NEXT: ret i1 [[CMP]]
2202 %ogt.pos1 = fcmp ogt float %arg, 1.0
2203 call void @llvm.assume(i1 %ogt.pos1)
2204 %cmp = fcmp ole float %arg, 0.0
2208 define i1 @assume_ogt_pos1__one_0(float %arg) {
2209 ; CHECK-LABEL: define i1 @assume_ogt_pos1__one_0(
2210 ; CHECK-SAME: float [[ARG:%.*]]) {
2211 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2212 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2213 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2214 ; CHECK-NEXT: ret i1 [[CMP]]
2216 %ogt.pos1 = fcmp ogt float %arg, 1.0
2217 call void @llvm.assume(i1 %ogt.pos1)
2218 %cmp = fcmp one float %arg, 0.0
2222 define i1 @assume_ogt_pos1__ord_0(float %arg) {
2223 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ord_0(
2224 ; CHECK-SAME: float [[ARG:%.*]]) {
2225 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2226 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2227 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2228 ; CHECK-NEXT: ret i1 [[CMP]]
2230 %ogt.pos1 = fcmp ogt float %arg, 1.0
2231 call void @llvm.assume(i1 %ogt.pos1)
2232 %cmp = fcmp ord float %arg, 0.0
2236 define i1 @assume_ogt_pos1__ueq_0(float %arg) {
2237 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ueq_0(
2238 ; CHECK-SAME: float [[ARG:%.*]]) {
2239 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2240 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2241 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2242 ; CHECK-NEXT: ret i1 [[CMP]]
2244 %ogt.pos1 = fcmp ogt float %arg, 1.0
2245 call void @llvm.assume(i1 %ogt.pos1)
2246 %cmp = fcmp ueq float %arg, 0.0
2250 define i1 @assume_ogt_pos1__ugt_0(float %arg) {
2251 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ugt_0(
2252 ; CHECK-SAME: float [[ARG:%.*]]) {
2253 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2254 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2255 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2256 ; CHECK-NEXT: ret i1 [[CMP]]
2258 %ogt.pos1 = fcmp ogt float %arg, 1.0
2259 call void @llvm.assume(i1 %ogt.pos1)
2260 %cmp = fcmp ugt float %arg, 0.0
2264 define i1 @assume_ogt_pos1__uge_0(float %arg) {
2265 ; CHECK-LABEL: define i1 @assume_ogt_pos1__uge_0(
2266 ; CHECK-SAME: float [[ARG:%.*]]) {
2267 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2268 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2269 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2270 ; CHECK-NEXT: ret i1 [[CMP]]
2272 %ogt.pos1 = fcmp ogt float %arg, 1.0
2273 call void @llvm.assume(i1 %ogt.pos1)
2274 %cmp = fcmp uge float %arg, 0.0
2278 define i1 @assume_ogt_pos1__ult_0(float %arg) {
2279 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ult_0(
2280 ; CHECK-SAME: float [[ARG:%.*]]) {
2281 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2282 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2283 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2284 ; CHECK-NEXT: ret i1 [[CMP]]
2286 %ogt.pos1 = fcmp ogt float %arg, 1.0
2287 call void @llvm.assume(i1 %ogt.pos1)
2288 %cmp = fcmp ult float %arg, 0.0
2292 define i1 @assume_ogt_pos1__ule_0(float %arg) {
2293 ; CHECK-LABEL: define i1 @assume_ogt_pos1__ule_0(
2294 ; CHECK-SAME: float [[ARG:%.*]]) {
2295 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2296 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2297 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2298 ; CHECK-NEXT: ret i1 [[CMP]]
2300 %ogt.pos1 = fcmp ogt float %arg, 1.0
2301 call void @llvm.assume(i1 %ogt.pos1)
2302 %cmp = fcmp ule float %arg, 0.0
2306 define i1 @assume_ogt_pos1__une_0(float %arg) {
2307 ; CHECK-LABEL: define i1 @assume_ogt_pos1__une_0(
2308 ; CHECK-SAME: float [[ARG:%.*]]) {
2309 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2310 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2311 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2312 ; CHECK-NEXT: ret i1 [[CMP]]
2314 %ogt.pos1 = fcmp ogt float %arg, 1.0
2315 call void @llvm.assume(i1 %ogt.pos1)
2316 %cmp = fcmp une float %arg, 0.0
2320 define i1 @assume_ogt_pos1__uno_0(float %arg) {
2321 ; CHECK-LABEL: define i1 @assume_ogt_pos1__uno_0(
2322 ; CHECK-SAME: float [[ARG:%.*]]) {
2323 ; CHECK-NEXT: [[OGT_POS1:%.*]] = fcmp ogt float [[ARG]], 1.000000e+00
2324 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGT_POS1]])
2325 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2326 ; CHECK-NEXT: ret i1 [[CMP]]
2328 %ogt.pos1 = fcmp ogt float %arg, 1.0
2329 call void @llvm.assume(i1 %ogt.pos1)
2330 %cmp = fcmp uno float %arg, 0.0
2334 ; --------------------------------------------------------------------
2335 ; Test assume x >= 1.0 with compares to 0
2336 ; --------------------------------------------------------------------
2338 define i1 @assume_oge_pos1__oeq_0(float %arg) {
2339 ; CHECK-LABEL: define i1 @assume_oge_pos1__oeq_0(
2340 ; CHECK-SAME: float [[ARG:%.*]]) {
2341 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2342 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2343 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2344 ; CHECK-NEXT: ret i1 [[CMP]]
2346 %oge.pos1 = fcmp oge float %arg, 1.0
2347 call void @llvm.assume(i1 %oge.pos1)
2348 %cmp = fcmp oeq float %arg, 0.0
2352 define i1 @assume_oge_pos1__ogt_0(float %arg) {
2353 ; CHECK-LABEL: define i1 @assume_oge_pos1__ogt_0(
2354 ; CHECK-SAME: float [[ARG:%.*]]) {
2355 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2356 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2357 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2358 ; CHECK-NEXT: ret i1 [[CMP]]
2360 %oge.pos1 = fcmp oge float %arg, 1.0
2361 call void @llvm.assume(i1 %oge.pos1)
2362 %cmp = fcmp ogt float %arg, 0.0
2366 define i1 @assume_oge_pos1__oge_0(float %arg) {
2367 ; CHECK-LABEL: define i1 @assume_oge_pos1__oge_0(
2368 ; CHECK-SAME: float [[ARG:%.*]]) {
2369 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2370 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2371 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2372 ; CHECK-NEXT: ret i1 [[CMP]]
2374 %oge.pos1 = fcmp oge float %arg, 1.0
2375 call void @llvm.assume(i1 %oge.pos1)
2376 %cmp = fcmp oge float %arg, 0.0
2380 define i1 @assume_oge_pos1__olt_0(float %arg) {
2381 ; CHECK-LABEL: define i1 @assume_oge_pos1__olt_0(
2382 ; CHECK-SAME: float [[ARG:%.*]]) {
2383 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2384 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2385 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2386 ; CHECK-NEXT: ret i1 [[CMP]]
2388 %oge.pos1 = fcmp oge float %arg, 1.0
2389 call void @llvm.assume(i1 %oge.pos1)
2390 %cmp = fcmp olt float %arg, 0.0
2394 define i1 @assume_oge_pos1__ole_0(float %arg) {
2395 ; CHECK-LABEL: define i1 @assume_oge_pos1__ole_0(
2396 ; CHECK-SAME: float [[ARG:%.*]]) {
2397 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2398 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2399 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2400 ; CHECK-NEXT: ret i1 [[CMP]]
2402 %oge.pos1 = fcmp oge float %arg, 1.0
2403 call void @llvm.assume(i1 %oge.pos1)
2404 %cmp = fcmp ole float %arg, 0.0
2408 define i1 @assume_oge_pos1__one_0(float %arg) {
2409 ; CHECK-LABEL: define i1 @assume_oge_pos1__one_0(
2410 ; CHECK-SAME: float [[ARG:%.*]]) {
2411 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2412 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2413 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2414 ; CHECK-NEXT: ret i1 [[CMP]]
2416 %oge.pos1 = fcmp oge float %arg, 1.0
2417 call void @llvm.assume(i1 %oge.pos1)
2418 %cmp = fcmp one float %arg, 0.0
2422 define i1 @assume_oge_pos1__ord_0(float %arg) {
2423 ; CHECK-LABEL: define i1 @assume_oge_pos1__ord_0(
2424 ; CHECK-SAME: float [[ARG:%.*]]) {
2425 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2426 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2427 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2428 ; CHECK-NEXT: ret i1 [[CMP]]
2430 %oge.pos1 = fcmp oge float %arg, 1.0
2431 call void @llvm.assume(i1 %oge.pos1)
2432 %cmp = fcmp ord float %arg, 0.0
2436 define i1 @assume_oge_pos1__ueq_0(float %arg) {
2437 ; CHECK-LABEL: define i1 @assume_oge_pos1__ueq_0(
2438 ; CHECK-SAME: float [[ARG:%.*]]) {
2439 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2440 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2441 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2442 ; CHECK-NEXT: ret i1 [[CMP]]
2444 %oge.pos1 = fcmp oge float %arg, 1.0
2445 call void @llvm.assume(i1 %oge.pos1)
2446 %cmp = fcmp ueq float %arg, 0.0
2450 define i1 @assume_oge_pos1__ugt_0(float %arg) {
2451 ; CHECK-LABEL: define i1 @assume_oge_pos1__ugt_0(
2452 ; CHECK-SAME: float [[ARG:%.*]]) {
2453 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2454 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2455 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2456 ; CHECK-NEXT: ret i1 [[CMP]]
2458 %oge.pos1 = fcmp oge float %arg, 1.0
2459 call void @llvm.assume(i1 %oge.pos1)
2460 %cmp = fcmp ugt float %arg, 0.0
2464 define i1 @assume_oge_pos1__uge_0(float %arg) {
2465 ; CHECK-LABEL: define i1 @assume_oge_pos1__uge_0(
2466 ; CHECK-SAME: float [[ARG:%.*]]) {
2467 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2468 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2469 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2470 ; CHECK-NEXT: ret i1 [[CMP]]
2472 %oge.pos1 = fcmp oge float %arg, 1.0
2473 call void @llvm.assume(i1 %oge.pos1)
2474 %cmp = fcmp uge float %arg, 0.0
2478 define i1 @assume_oge_pos1__ult_0(float %arg) {
2479 ; CHECK-LABEL: define i1 @assume_oge_pos1__ult_0(
2480 ; CHECK-SAME: float [[ARG:%.*]]) {
2481 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2482 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2483 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2484 ; CHECK-NEXT: ret i1 [[CMP]]
2486 %oge.pos1 = fcmp oge float %arg, 1.0
2487 call void @llvm.assume(i1 %oge.pos1)
2488 %cmp = fcmp ult float %arg, 0.0
2492 define i1 @assume_oge_pos1__ule_0(float %arg) {
2493 ; CHECK-LABEL: define i1 @assume_oge_pos1__ule_0(
2494 ; CHECK-SAME: float [[ARG:%.*]]) {
2495 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2496 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2497 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2498 ; CHECK-NEXT: ret i1 [[CMP]]
2500 %oge.pos1 = fcmp oge float %arg, 1.0
2501 call void @llvm.assume(i1 %oge.pos1)
2502 %cmp = fcmp ule float %arg, 0.0
2506 define i1 @assume_oge_pos1__une_0(float %arg) {
2507 ; CHECK-LABEL: define i1 @assume_oge_pos1__une_0(
2508 ; CHECK-SAME: float [[ARG:%.*]]) {
2509 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2510 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2511 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2512 ; CHECK-NEXT: ret i1 [[CMP]]
2514 %oge.pos1 = fcmp oge float %arg, 1.0
2515 call void @llvm.assume(i1 %oge.pos1)
2516 %cmp = fcmp une float %arg, 0.0
2520 define i1 @assume_oge_pos1__uno_0(float %arg) {
2521 ; CHECK-LABEL: define i1 @assume_oge_pos1__uno_0(
2522 ; CHECK-SAME: float [[ARG:%.*]]) {
2523 ; CHECK-NEXT: [[OGE_POS1:%.*]] = fcmp oge float [[ARG]], 1.000000e+00
2524 ; CHECK-NEXT: call void @llvm.assume(i1 [[OGE_POS1]])
2525 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2526 ; CHECK-NEXT: ret i1 [[CMP]]
2528 %oge.pos1 = fcmp oge float %arg, 1.0
2529 call void @llvm.assume(i1 %oge.pos1)
2530 %cmp = fcmp uno float %arg, 0.0
2534 ; --------------------------------------------------------------------
2535 ; Test assume x u> 1.0 with compares to 0
2536 ; --------------------------------------------------------------------
2538 define i1 @assume_ugt_pos1__oeq_0(float %arg) {
2539 ; CHECK-LABEL: define i1 @assume_ugt_pos1__oeq_0(
2540 ; CHECK-SAME: float [[ARG:%.*]]) {
2541 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2542 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2543 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2544 ; CHECK-NEXT: ret i1 [[CMP]]
2546 %ugt.pos1 = fcmp ugt float %arg, 1.0
2547 call void @llvm.assume(i1 %ugt.pos1)
2548 %cmp = fcmp oeq float %arg, 0.0
2552 define i1 @assume_ugt_pos1__ogt_0(float %arg) {
2553 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ogt_0(
2554 ; CHECK-SAME: float [[ARG:%.*]]) {
2555 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2556 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2557 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2558 ; CHECK-NEXT: ret i1 [[CMP]]
2560 %ugt.pos1 = fcmp ugt float %arg, 1.0
2561 call void @llvm.assume(i1 %ugt.pos1)
2562 %cmp = fcmp ogt float %arg, 0.0
2566 define i1 @assume_ugt_pos1__oge_0(float %arg) {
2567 ; CHECK-LABEL: define i1 @assume_ugt_pos1__oge_0(
2568 ; CHECK-SAME: float [[ARG:%.*]]) {
2569 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2570 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2571 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2572 ; CHECK-NEXT: ret i1 [[CMP]]
2574 %ugt.pos1 = fcmp ugt float %arg, 1.0
2575 call void @llvm.assume(i1 %ugt.pos1)
2576 %cmp = fcmp oge float %arg, 0.0
2580 define i1 @assume_ugt_pos1__olt_0(float %arg) {
2581 ; CHECK-LABEL: define i1 @assume_ugt_pos1__olt_0(
2582 ; CHECK-SAME: float [[ARG:%.*]]) {
2583 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2584 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2585 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2586 ; CHECK-NEXT: ret i1 [[CMP]]
2588 %ugt.pos1 = fcmp ugt float %arg, 1.0
2589 call void @llvm.assume(i1 %ugt.pos1)
2590 %cmp = fcmp olt float %arg, 0.0
2594 define i1 @assume_ugt_pos1__ole_0(float %arg) {
2595 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ole_0(
2596 ; CHECK-SAME: float [[ARG:%.*]]) {
2597 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2598 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2599 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2600 ; CHECK-NEXT: ret i1 [[CMP]]
2602 %ugt.pos1 = fcmp ugt float %arg, 1.0
2603 call void @llvm.assume(i1 %ugt.pos1)
2604 %cmp = fcmp ole float %arg, 0.0
2608 define i1 @assume_ugt_pos1__one_0(float %arg) {
2609 ; CHECK-LABEL: define i1 @assume_ugt_pos1__one_0(
2610 ; CHECK-SAME: float [[ARG:%.*]]) {
2611 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2612 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2613 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2614 ; CHECK-NEXT: ret i1 [[CMP]]
2616 %ugt.pos1 = fcmp ugt float %arg, 1.0
2617 call void @llvm.assume(i1 %ugt.pos1)
2618 %cmp = fcmp one float %arg, 0.0
2622 define i1 @assume_ugt_pos1__ord_0(float %arg) {
2623 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ord_0(
2624 ; CHECK-SAME: float [[ARG:%.*]]) {
2625 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2626 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2627 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2628 ; CHECK-NEXT: ret i1 [[CMP]]
2630 %ugt.pos1 = fcmp ugt float %arg, 1.0
2631 call void @llvm.assume(i1 %ugt.pos1)
2632 %cmp = fcmp ord float %arg, 0.0
2636 define i1 @assume_ugt_pos1__ueq_0(float %arg) {
2637 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ueq_0(
2638 ; CHECK-SAME: float [[ARG:%.*]]) {
2639 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2640 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2641 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2642 ; CHECK-NEXT: ret i1 [[CMP]]
2644 %ugt.pos1 = fcmp ugt float %arg, 1.0
2645 call void @llvm.assume(i1 %ugt.pos1)
2646 %cmp = fcmp ueq float %arg, 0.0
2650 define i1 @assume_ugt_pos1__ugt_0(float %arg) {
2651 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ugt_0(
2652 ; CHECK-SAME: float [[ARG:%.*]]) {
2653 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2654 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2655 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2656 ; CHECK-NEXT: ret i1 [[CMP]]
2658 %ugt.pos1 = fcmp ugt float %arg, 1.0
2659 call void @llvm.assume(i1 %ugt.pos1)
2660 %cmp = fcmp ugt float %arg, 0.0
2664 define i1 @assume_ugt_pos1__uge_0(float %arg) {
2665 ; CHECK-LABEL: define i1 @assume_ugt_pos1__uge_0(
2666 ; CHECK-SAME: float [[ARG:%.*]]) {
2667 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2668 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2669 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2670 ; CHECK-NEXT: ret i1 [[CMP]]
2672 %ugt.pos1 = fcmp ugt float %arg, 1.0
2673 call void @llvm.assume(i1 %ugt.pos1)
2674 %cmp = fcmp uge float %arg, 0.0
2678 define i1 @assume_ugt_pos1__ult_0(float %arg) {
2679 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ult_0(
2680 ; CHECK-SAME: float [[ARG:%.*]]) {
2681 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2682 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2683 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2684 ; CHECK-NEXT: ret i1 [[CMP]]
2686 %ugt.pos1 = fcmp ugt float %arg, 1.0
2687 call void @llvm.assume(i1 %ugt.pos1)
2688 %cmp = fcmp ult float %arg, 0.0
2692 define i1 @assume_ugt_pos1__ule_0(float %arg) {
2693 ; CHECK-LABEL: define i1 @assume_ugt_pos1__ule_0(
2694 ; CHECK-SAME: float [[ARG:%.*]]) {
2695 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2696 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2697 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2698 ; CHECK-NEXT: ret i1 [[CMP]]
2700 %ugt.pos1 = fcmp ugt float %arg, 1.0
2701 call void @llvm.assume(i1 %ugt.pos1)
2702 %cmp = fcmp ule float %arg, 0.0
2706 define i1 @assume_ugt_pos1__une_0(float %arg) {
2707 ; CHECK-LABEL: define i1 @assume_ugt_pos1__une_0(
2708 ; CHECK-SAME: float [[ARG:%.*]]) {
2709 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2710 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2711 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2712 ; CHECK-NEXT: ret i1 [[CMP]]
2714 %ugt.pos1 = fcmp ugt float %arg, 1.0
2715 call void @llvm.assume(i1 %ugt.pos1)
2716 %cmp = fcmp une float %arg, 0.0
2720 define i1 @assume_ugt_pos1__uno_0(float %arg) {
2721 ; CHECK-LABEL: define i1 @assume_ugt_pos1__uno_0(
2722 ; CHECK-SAME: float [[ARG:%.*]]) {
2723 ; CHECK-NEXT: [[UGT_POS1:%.*]] = fcmp ugt float [[ARG]], 1.000000e+00
2724 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGT_POS1]])
2725 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2726 ; CHECK-NEXT: ret i1 [[CMP]]
2728 %ugt.pos1 = fcmp ugt float %arg, 1.0
2729 call void @llvm.assume(i1 %ugt.pos1)
2730 %cmp = fcmp uno float %arg, 0.0
2734 ; --------------------------------------------------------------------
2735 ; Test assume x u>= 1.0 with compares to 0
2736 ; --------------------------------------------------------------------
2738 define i1 @assume_uge_pos1__oeq_0(float %arg) {
2739 ; CHECK-LABEL: define i1 @assume_uge_pos1__oeq_0(
2740 ; CHECK-SAME: float [[ARG:%.*]]) {
2741 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2742 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2743 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0.000000e+00
2744 ; CHECK-NEXT: ret i1 [[CMP]]
2746 %uge.pos1 = fcmp uge float %arg, 1.0
2747 call void @llvm.assume(i1 %uge.pos1)
2748 %cmp = fcmp oeq float %arg, 0.0
2752 define i1 @assume_uge_pos1__ogt_0(float %arg) {
2753 ; CHECK-LABEL: define i1 @assume_uge_pos1__ogt_0(
2754 ; CHECK-SAME: float [[ARG:%.*]]) {
2755 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2756 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2757 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt float [[ARG]], 0.000000e+00
2758 ; CHECK-NEXT: ret i1 [[CMP]]
2760 %uge.pos1 = fcmp uge float %arg, 1.0
2761 call void @llvm.assume(i1 %uge.pos1)
2762 %cmp = fcmp ogt float %arg, 0.0
2766 define i1 @assume_uge_pos1__oge_0(float %arg) {
2767 ; CHECK-LABEL: define i1 @assume_uge_pos1__oge_0(
2768 ; CHECK-SAME: float [[ARG:%.*]]) {
2769 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2770 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2771 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oge float [[ARG]], 0.000000e+00
2772 ; CHECK-NEXT: ret i1 [[CMP]]
2774 %uge.pos1 = fcmp uge float %arg, 1.0
2775 call void @llvm.assume(i1 %uge.pos1)
2776 %cmp = fcmp oge float %arg, 0.0
2780 define i1 @assume_uge_pos1__olt_0(float %arg) {
2781 ; CHECK-LABEL: define i1 @assume_uge_pos1__olt_0(
2782 ; CHECK-SAME: float [[ARG:%.*]]) {
2783 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2784 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2785 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 0.000000e+00
2786 ; CHECK-NEXT: ret i1 [[CMP]]
2788 %uge.pos1 = fcmp uge float %arg, 1.0
2789 call void @llvm.assume(i1 %uge.pos1)
2790 %cmp = fcmp olt float %arg, 0.0
2794 define i1 @assume_uge_pos1__ole_0(float %arg) {
2795 ; CHECK-LABEL: define i1 @assume_uge_pos1__ole_0(
2796 ; CHECK-SAME: float [[ARG:%.*]]) {
2797 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2798 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2799 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ole float [[ARG]], 0.000000e+00
2800 ; CHECK-NEXT: ret i1 [[CMP]]
2802 %uge.pos1 = fcmp uge float %arg, 1.0
2803 call void @llvm.assume(i1 %uge.pos1)
2804 %cmp = fcmp ole float %arg, 0.0
2808 define i1 @assume_uge_pos1__one_0(float %arg) {
2809 ; CHECK-LABEL: define i1 @assume_uge_pos1__one_0(
2810 ; CHECK-SAME: float [[ARG:%.*]]) {
2811 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2812 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2813 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0.000000e+00
2814 ; CHECK-NEXT: ret i1 [[CMP]]
2816 %uge.pos1 = fcmp uge float %arg, 1.0
2817 call void @llvm.assume(i1 %uge.pos1)
2818 %cmp = fcmp one float %arg, 0.0
2822 define i1 @assume_uge_pos1__ord_0(float %arg) {
2823 ; CHECK-LABEL: define i1 @assume_uge_pos1__ord_0(
2824 ; CHECK-SAME: float [[ARG:%.*]]) {
2825 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2826 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2827 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[ARG]], 0.000000e+00
2828 ; CHECK-NEXT: ret i1 [[CMP]]
2830 %uge.pos1 = fcmp uge float %arg, 1.0
2831 call void @llvm.assume(i1 %uge.pos1)
2832 %cmp = fcmp ord float %arg, 0.0
2836 define i1 @assume_uge_pos1__ueq_0(float %arg) {
2837 ; CHECK-LABEL: define i1 @assume_uge_pos1__ueq_0(
2838 ; CHECK-SAME: float [[ARG:%.*]]) {
2839 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2840 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2841 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[ARG]], 0.000000e+00
2842 ; CHECK-NEXT: ret i1 [[CMP]]
2844 %uge.pos1 = fcmp uge float %arg, 1.0
2845 call void @llvm.assume(i1 %uge.pos1)
2846 %cmp = fcmp ueq float %arg, 0.0
2850 define i1 @assume_uge_pos1__ugt_0(float %arg) {
2851 ; CHECK-LABEL: define i1 @assume_uge_pos1__ugt_0(
2852 ; CHECK-SAME: float [[ARG:%.*]]) {
2853 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2854 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2855 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ugt float [[ARG]], 0.000000e+00
2856 ; CHECK-NEXT: ret i1 [[CMP]]
2858 %uge.pos1 = fcmp uge float %arg, 1.0
2859 call void @llvm.assume(i1 %uge.pos1)
2860 %cmp = fcmp ugt float %arg, 0.0
2864 define i1 @assume_uge_pos1__uge_0(float %arg) {
2865 ; CHECK-LABEL: define i1 @assume_uge_pos1__uge_0(
2866 ; CHECK-SAME: float [[ARG:%.*]]) {
2867 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2868 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2869 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uge float [[ARG]], 0.000000e+00
2870 ; CHECK-NEXT: ret i1 [[CMP]]
2872 %uge.pos1 = fcmp uge float %arg, 1.0
2873 call void @llvm.assume(i1 %uge.pos1)
2874 %cmp = fcmp uge float %arg, 0.0
2878 define i1 @assume_uge_pos1__ult_0(float %arg) {
2879 ; CHECK-LABEL: define i1 @assume_uge_pos1__ult_0(
2880 ; CHECK-SAME: float [[ARG:%.*]]) {
2881 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2882 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2883 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ult float [[ARG]], 0.000000e+00
2884 ; CHECK-NEXT: ret i1 [[CMP]]
2886 %uge.pos1 = fcmp uge float %arg, 1.0
2887 call void @llvm.assume(i1 %uge.pos1)
2888 %cmp = fcmp ult float %arg, 0.0
2892 define i1 @assume_uge_pos1__ule_0(float %arg) {
2893 ; CHECK-LABEL: define i1 @assume_uge_pos1__ule_0(
2894 ; CHECK-SAME: float [[ARG:%.*]]) {
2895 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2896 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2897 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ule float [[ARG]], 0.000000e+00
2898 ; CHECK-NEXT: ret i1 [[CMP]]
2900 %uge.pos1 = fcmp uge float %arg, 1.0
2901 call void @llvm.assume(i1 %uge.pos1)
2902 %cmp = fcmp ule float %arg, 0.0
2906 define i1 @assume_uge_pos1__une_0(float %arg) {
2907 ; CHECK-LABEL: define i1 @assume_uge_pos1__une_0(
2908 ; CHECK-SAME: float [[ARG:%.*]]) {
2909 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2910 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2911 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une float [[ARG]], 0.000000e+00
2912 ; CHECK-NEXT: ret i1 [[CMP]]
2914 %uge.pos1 = fcmp uge float %arg, 1.0
2915 call void @llvm.assume(i1 %uge.pos1)
2916 %cmp = fcmp une float %arg, 0.0
2920 define i1 @assume_uge_pos1__uno_0(float %arg) {
2921 ; CHECK-LABEL: define i1 @assume_uge_pos1__uno_0(
2922 ; CHECK-SAME: float [[ARG:%.*]]) {
2923 ; CHECK-NEXT: [[UGE_POS1:%.*]] = fcmp uge float [[ARG]], 1.000000e+00
2924 ; CHECK-NEXT: call void @llvm.assume(i1 [[UGE_POS1]])
2925 ; CHECK-NEXT: [[CMP:%.*]] = fcmp uno float [[ARG]], 0.000000e+00
2926 ; CHECK-NEXT: ret i1 [[CMP]]
2928 %uge.pos1 = fcmp uge float %arg, 1.0
2929 call void @llvm.assume(i1 %uge.pos1)
2930 %cmp = fcmp uno float %arg, 0.0
2934 ; --------------------------------------------------------------------
2935 ; Test assume x < -1.0 with compares to inf
2936 ; --------------------------------------------------------------------
2938 define i1 @assume_olt_neg1__oeq_inf(float %arg) {
2939 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_inf(
2940 ; CHECK-SAME: float [[ARG:%.*]]) {
2941 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2942 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2943 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0x7FF0000000000000
2944 ; CHECK-NEXT: ret i1 [[CMP]]
2946 %olt.neg1 = fcmp olt float %arg, -1.0
2947 call void @llvm.assume(i1 %olt.neg1)
2948 %cmp = fcmp oeq float %arg, 0x7FF0000000000000
2952 define i1 @assume_olt_neg1__one_inf(float %arg) {
2953 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_inf(
2954 ; CHECK-SAME: float [[ARG:%.*]]) {
2955 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2956 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2957 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0x7FF0000000000000
2958 ; CHECK-NEXT: ret i1 [[CMP]]
2960 %olt.neg1 = fcmp olt float %arg, -1.0
2961 call void @llvm.assume(i1 %olt.neg1)
2962 %cmp = fcmp one float %arg, 0x7FF0000000000000
2966 define i1 @assume_olt_neg1__oeq_ninf(float %arg) {
2967 ; CHECK-LABEL: define i1 @assume_olt_neg1__oeq_ninf(
2968 ; CHECK-SAME: float [[ARG:%.*]]) {
2969 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2970 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2971 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
2972 ; CHECK-NEXT: ret i1 [[CMP]]
2974 %olt.neg1 = fcmp olt float %arg, -1.0
2975 call void @llvm.assume(i1 %olt.neg1)
2976 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
2980 define i1 @assume_olt_neg1__one_ninf(float %arg) {
2981 ; CHECK-LABEL: define i1 @assume_olt_neg1__one_ninf(
2982 ; CHECK-SAME: float [[ARG:%.*]]) {
2983 ; CHECK-NEXT: [[OLT_NEG1:%.*]] = fcmp olt float [[ARG]], -1.000000e+00
2984 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_NEG1]])
2985 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0xFFF0000000000000
2986 ; CHECK-NEXT: ret i1 [[CMP]]
2988 %olt.neg1 = fcmp olt float %arg, -1.0
2989 call void @llvm.assume(i1 %olt.neg1)
2990 %cmp = fcmp one float %arg, 0xFFF0000000000000
2994 ; --------------------------------------------------------------------
2996 ; --------------------------------------------------------------------
2998 define i1 @assume_olt_1__oeq_2(float %arg) {
2999 ; CHECK-LABEL: define i1 @assume_olt_1__oeq_2(
3000 ; CHECK-SAME: float [[ARG:%.*]]) {
3001 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
3002 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
3003 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 2.000000e+00
3004 ; CHECK-NEXT: ret i1 [[CMP]]
3006 %olt.1 = fcmp olt float %arg, 1.0
3007 call void @llvm.assume(i1 %olt.1)
3008 %cmp = fcmp oeq float %arg, 2.0
3012 ; Ideally would fold to false
3013 define i1 @assume_ogt_2__oeq_2(float %arg) {
3014 ; CHECK-LABEL: define i1 @assume_ogt_2__oeq_2(
3015 ; CHECK-SAME: float [[ARG:%.*]]) {
3016 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp ogt float [[ARG]], 2.000000e+00
3017 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
3018 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 2.000000e+00
3019 ; CHECK-NEXT: ret i1 [[CMP]]
3021 %olt.1 = fcmp ogt float %arg, 2.0
3022 call void @llvm.assume(i1 %olt.1)
3023 %cmp = fcmp oeq float %arg, 2.0
3027 define i1 @assume_olt_2__olt_1(float %arg) {
3028 ; CHECK-LABEL: define i1 @assume_olt_2__olt_1(
3029 ; CHECK-SAME: float [[ARG:%.*]]) {
3030 ; CHECK-NEXT: [[OLT_1:%.*]] = fcmp olt float [[ARG]], 2.000000e+00
3031 ; CHECK-NEXT: call void @llvm.assume(i1 [[OLT_1]])
3032 ; CHECK-NEXT: [[CMP:%.*]] = fcmp olt float [[ARG]], 1.000000e+00
3033 ; CHECK-NEXT: ret i1 [[CMP]]
3035 %olt.1 = fcmp olt float %arg, 2.0
3036 call void @llvm.assume(i1 %olt.1)
3037 %cmp = fcmp olt float %arg, 1.0
3041 ; --------------------------------------------------------------------
3043 ; --------------------------------------------------------------------
3045 define i1 @assume_ogt_neginf_one_neginf(float %arg) {
3046 ; CHECK-LABEL: define i1 @assume_ogt_neginf_one_neginf(
3047 ; CHECK-SAME: float [[ARG:%.*]]) {
3048 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[ARG]], 0xFFF0000000000000
3049 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3050 ; CHECK-NEXT: ret i1 true
3052 %cmp.ogt.neginf = fcmp ogt float %arg, 0xFFF0000000000000
3053 call void @llvm.assume(i1 %cmp.ogt.neginf)
3054 %cmp = fcmp one float %arg, 0xFFF0000000000000
3058 define i1 @assume_ogt_neginf_oeq_posinf(float %arg) {
3059 ; CHECK-LABEL: define i1 @assume_ogt_neginf_oeq_posinf(
3060 ; CHECK-SAME: float [[ARG:%.*]]) {
3061 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[ARG]], 0xFFF0000000000000
3062 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3063 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0x7FF0000000000000
3064 ; CHECK-NEXT: ret i1 [[CMP]]
3066 %cmp.ogt.neginf = fcmp ogt float %arg, 0xFFF0000000000000
3067 call void @llvm.assume(i1 %cmp.ogt.neginf)
3068 %cmp = fcmp oeq float %arg, 0x7FF0000000000000
3072 define i1 @assume_ule_neginf_oeq_neginf(float %arg) {
3073 ; CHECK-LABEL: define i1 @assume_ule_neginf_oeq_neginf(
3074 ; CHECK-SAME: float [[ARG:%.*]]) {
3075 ; CHECK-NEXT: [[CMP_ULE_NEGINF:%.*]] = fcmp ule float [[ARG]], 0xFFF0000000000000
3076 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_ULE_NEGINF]])
3077 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
3078 ; CHECK-NEXT: ret i1 [[CMP]]
3080 %cmp.ule.neginf = fcmp ule float %arg, 0xFFF0000000000000
3081 call void @llvm.assume(i1 %cmp.ule.neginf)
3082 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3086 define i1 @assume_ult_neginf_oeq_neginf(float %arg) {
3087 ; CHECK-LABEL: define i1 @assume_ult_neginf_oeq_neginf(
3088 ; CHECK-SAME: float [[ARG:%.*]]) {
3089 ; CHECK-NEXT: [[CMP_ULT_NEGINF:%.*]] = fcmp ult float [[ARG]], 0xFFF0000000000000
3090 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_ULT_NEGINF]])
3091 ; CHECK-NEXT: ret i1 false
3093 %cmp.ult.neginf = fcmp ult float %arg, 0xFFF0000000000000
3094 call void @llvm.assume(i1 %cmp.ult.neginf)
3095 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3099 define i1 @assume_fabs_ogt_neginf_one_neginf(float %arg) {
3100 ; CHECK-LABEL: define i1 @assume_fabs_ogt_neginf_one_neginf(
3101 ; CHECK-SAME: float [[ARG:%.*]]) {
3102 ; CHECK-NEXT: [[FABS_ARG:%.*]] = call float @llvm.fabs.f32(float [[ARG]])
3103 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[FABS_ARG]], 0xFFF0000000000000
3104 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3105 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0xFFF0000000000000
3106 ; CHECK-NEXT: ret i1 [[CMP]]
3108 %fabs.arg = call float @llvm.fabs.f32(float %arg)
3109 %cmp.ogt.neginf = fcmp ogt float %fabs.arg, 0xFFF0000000000000
3110 call void @llvm.assume(i1 %cmp.ogt.neginf)
3111 %cmp = fcmp one float %arg, 0xFFF0000000000000
3115 define i1 @assume_fabs_ogt_neginf_one_posinf(float %arg) {
3116 ; CHECK-LABEL: define i1 @assume_fabs_ogt_neginf_one_posinf(
3117 ; CHECK-SAME: float [[ARG:%.*]]) {
3118 ; CHECK-NEXT: [[FABS_ARG:%.*]] = call float @llvm.fabs.f32(float [[ARG]])
3119 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ogt float [[FABS_ARG]], 0xFFF0000000000000
3120 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3121 ; CHECK-NEXT: [[CMP:%.*]] = fcmp one float [[ARG]], 0x7FF0000000000000
3122 ; CHECK-NEXT: ret i1 [[CMP]]
3124 %fabs.arg = call float @llvm.fabs.f32(float %arg)
3125 %cmp.ogt.neginf = fcmp ogt float %fabs.arg, 0xFFF0000000000000
3126 call void @llvm.assume(i1 %cmp.ogt.neginf)
3127 %cmp = fcmp one float %arg, 0x7FF0000000000000
3131 define i1 @assume_fabs_ule_neginf_oeq_neginf(float %arg) {
3132 ; CHECK-LABEL: define i1 @assume_fabs_ule_neginf_oeq_neginf(
3133 ; CHECK-SAME: float [[ARG:%.*]]) {
3134 ; CHECK-NEXT: [[FABS_ARG:%.*]] = call float @llvm.fabs.f32(float [[ARG]])
3135 ; CHECK-NEXT: [[CMP_OGT_NEGINF:%.*]] = fcmp ule float [[FABS_ARG]], 0xFFF0000000000000
3136 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGT_NEGINF]])
3137 ; CHECK-NEXT: ret i1 false
3139 %fabs.arg = call float @llvm.fabs.f32(float %arg)
3140 %cmp.ogt.neginf = fcmp ule float %fabs.arg, 0xFFF0000000000000
3141 call void @llvm.assume(i1 %cmp.ogt.neginf)
3142 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3146 define i1 @assume_oge_neginf_oeq_neginf(float %arg) {
3147 ; CHECK-LABEL: define i1 @assume_oge_neginf_oeq_neginf(
3148 ; CHECK-SAME: float [[ARG:%.*]]) {
3149 ; CHECK-NEXT: [[CMP_OGE_NEGINF:%.*]] = fcmp oge float [[ARG]], 0xFFF0000000000000
3150 ; CHECK-NEXT: call void @llvm.assume(i1 [[CMP_OGE_NEGINF]])
3151 ; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[ARG]], 0xFFF0000000000000
3152 ; CHECK-NEXT: ret i1 [[CMP]]
3154 %cmp.oge.neginf = fcmp oge float %arg, 0xFFF0000000000000
3155 call void @llvm.assume(i1 %cmp.oge.neginf)
3156 %cmp = fcmp oeq float %arg, 0xFFF0000000000000
3160 attributes #0 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }