1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
4 ; TODO: the instructions with poison operands should return poison
10 define float @fadd_undef_op0_strict(float %x) #0 {
11 ; CHECK-LABEL: @fadd_undef_op0_strict(
12 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
13 ; CHECK-NEXT: ret float [[R]]
15 %r = call float @llvm.experimental.constrained.fadd.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
19 define float @fadd_undef_op0_maytrap(float %x) #0 {
20 ; CHECK-LABEL: @fadd_undef_op0_maytrap(
21 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
22 ; CHECK-NEXT: ret float [[R]]
24 %r = call float @llvm.experimental.constrained.fadd.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
28 define float @fadd_undef_op0_upward(float %x) #0 {
29 ; CHECK-LABEL: @fadd_undef_op0_upward(
30 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float undef, float [[X:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
31 ; CHECK-NEXT: ret float [[R]]
33 %r = call float @llvm.experimental.constrained.fadd.f32(float undef, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
37 define float @fadd_undef_op0_defaultfp(float %x) #0 {
38 ; CHECK-LABEL: @fadd_undef_op0_defaultfp(
39 ; CHECK-NEXT: ret float 0x7FF8000000000000
41 %r = call float @llvm.experimental.constrained.fadd.f32(float undef, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
45 define float @fadd_poison_op0_strict(float %x) #0 {
46 ; CHECK-LABEL: @fadd_poison_op0_strict(
47 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float poison, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
48 ; CHECK-NEXT: ret float poison
50 %r = call float @llvm.experimental.constrained.fadd.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
54 define float @fadd_poison_op0_maytrap(float %x) #0 {
55 ; CHECK-LABEL: @fadd_poison_op0_maytrap(
56 ; CHECK-NEXT: ret float poison
58 %r = call float @llvm.experimental.constrained.fadd.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
62 define float @fadd_poison_op0_upward(float %x) #0 {
63 ; CHECK-LABEL: @fadd_poison_op0_upward(
64 ; CHECK-NEXT: ret float poison
66 %r = call float @llvm.experimental.constrained.fadd.f32(float poison, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
70 define float @fadd_poison_op0_defaultfp(float %x) #0 {
71 ; CHECK-LABEL: @fadd_poison_op0_defaultfp(
72 ; CHECK-NEXT: ret float poison
74 %r = call float @llvm.experimental.constrained.fadd.f32(float poison, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
78 define float @fadd_undef_op1_strict(float %x) #0 {
79 ; CHECK-LABEL: @fadd_undef_op1_strict(
80 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
81 ; CHECK-NEXT: ret float [[R]]
83 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
87 define float @fadd_undef_op1_maytrap(float %x) #0 {
88 ; CHECK-LABEL: @fadd_undef_op1_maytrap(
89 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
90 ; CHECK-NEXT: ret float [[R]]
92 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
96 define float @fadd_undef_op1_upward(float %x) #0 {
97 ; CHECK-LABEL: @fadd_undef_op1_upward(
98 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float [[X:%.*]], float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
99 ; CHECK-NEXT: ret float [[R]]
101 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
105 define float @fadd_undef_op1_defaultfp(float %x) #0 {
106 ; CHECK-LABEL: @fadd_undef_op1_defaultfp(
107 ; CHECK-NEXT: ret float 0x7FF8000000000000
109 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float undef, metadata !"round.tonearest", metadata !"fpexcept.ignore")
113 define float @fadd_poison_op1_strict(float %x) #0 {
114 ; CHECK-LABEL: @fadd_poison_op1_strict(
115 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fadd.f32(float [[X:%.*]], float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
116 ; CHECK-NEXT: ret float poison
118 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
122 define float @fadd_poison_op1_maytrap(float %x) #0 {
123 ; CHECK-LABEL: @fadd_poison_op1_maytrap(
124 ; CHECK-NEXT: ret float poison
126 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
130 define float @fadd_poison_op1_upward(float %x) #0 {
131 ; CHECK-LABEL: @fadd_poison_op1_upward(
132 ; CHECK-NEXT: ret float poison
134 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float poison, metadata !"round.upward", metadata !"fpexcept.ignore")
138 define float @fadd_poison_op1_defaultfp(float %x) #0 {
139 ; CHECK-LABEL: @fadd_poison_op1_defaultfp(
140 ; CHECK-NEXT: ret float poison
142 %r = call float @llvm.experimental.constrained.fadd.f32(float %x, float poison, metadata !"round.tonearest", metadata !"fpexcept.ignore")
150 define float @fsub_undef_op0_strict(float %x) #0 {
151 ; CHECK-LABEL: @fsub_undef_op0_strict(
152 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
153 ; CHECK-NEXT: ret float [[R]]
155 %r = call float @llvm.experimental.constrained.fsub.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
159 define float @fsub_undef_op0_maytrap(float %x) #0 {
160 ; CHECK-LABEL: @fsub_undef_op0_maytrap(
161 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
162 ; CHECK-NEXT: ret float [[R]]
164 %r = call float @llvm.experimental.constrained.fsub.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
168 define float @fsub_undef_op0_upward(float %x) #0 {
169 ; CHECK-LABEL: @fsub_undef_op0_upward(
170 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float undef, float [[X:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
171 ; CHECK-NEXT: ret float [[R]]
173 %r = call float @llvm.experimental.constrained.fsub.f32(float undef, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
177 define float @fsub_undef_op0_defaultfp(float %x) #0 {
178 ; CHECK-LABEL: @fsub_undef_op0_defaultfp(
179 ; CHECK-NEXT: ret float 0x7FF8000000000000
181 %r = call float @llvm.experimental.constrained.fsub.f32(float undef, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
185 define float @fsub_poison_op0_strict(float %x) #0 {
186 ; CHECK-LABEL: @fsub_poison_op0_strict(
187 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float poison, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
188 ; CHECK-NEXT: ret float poison
190 %r = call float @llvm.experimental.constrained.fsub.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
194 define float @fsub_poison_op0_maytrap(float %x) #0 {
195 ; CHECK-LABEL: @fsub_poison_op0_maytrap(
196 ; CHECK-NEXT: ret float poison
198 %r = call float @llvm.experimental.constrained.fsub.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
202 define float @fsub_poison_op0_upward(float %x) #0 {
203 ; CHECK-LABEL: @fsub_poison_op0_upward(
204 ; CHECK-NEXT: ret float poison
206 %r = call float @llvm.experimental.constrained.fsub.f32(float poison, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
210 define float @fsub_poison_op0_defaultfp(float %x) #0 {
211 ; CHECK-LABEL: @fsub_poison_op0_defaultfp(
212 ; CHECK-NEXT: ret float poison
214 %r = call float @llvm.experimental.constrained.fsub.f32(float poison, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
218 define float @fsub_undef_op1_strict(float %x) #0 {
219 ; CHECK-LABEL: @fsub_undef_op1_strict(
220 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
221 ; CHECK-NEXT: ret float [[R]]
223 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
227 define float @fsub_undef_op1_maytrap(float %x) #0 {
228 ; CHECK-LABEL: @fsub_undef_op1_maytrap(
229 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
230 ; CHECK-NEXT: ret float [[R]]
232 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
236 define float @fsub_undef_op1_upward(float %x) #0 {
237 ; CHECK-LABEL: @fsub_undef_op1_upward(
238 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float [[X:%.*]], float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
239 ; CHECK-NEXT: ret float [[R]]
241 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
245 define float @fsub_undef_op1_defaultfp(float %x) #0 {
246 ; CHECK-LABEL: @fsub_undef_op1_defaultfp(
247 ; CHECK-NEXT: ret float 0x7FF8000000000000
249 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float undef, metadata !"round.tonearest", metadata !"fpexcept.ignore")
253 define float @fsub_poison_op1_strict(float %x) #0 {
254 ; CHECK-LABEL: @fsub_poison_op1_strict(
255 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fsub.f32(float [[X:%.*]], float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
256 ; CHECK-NEXT: ret float poison
258 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
262 define float @fsub_poison_op1_maytrap(float %x) #0 {
263 ; CHECK-LABEL: @fsub_poison_op1_maytrap(
264 ; CHECK-NEXT: ret float poison
266 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
270 define float @fsub_poison_op1_upward(float %x) #0 {
271 ; CHECK-LABEL: @fsub_poison_op1_upward(
272 ; CHECK-NEXT: ret float poison
274 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float poison, metadata !"round.upward", metadata !"fpexcept.ignore")
278 define float @fsub_poison_op1_defaultfp(float %x) #0 {
279 ; CHECK-LABEL: @fsub_poison_op1_defaultfp(
280 ; CHECK-NEXT: ret float poison
282 %r = call float @llvm.experimental.constrained.fsub.f32(float %x, float poison, metadata !"round.tonearest", metadata !"fpexcept.ignore")
290 define float @fmul_undef_op0_strict(float %x) #0 {
291 ; CHECK-LABEL: @fmul_undef_op0_strict(
292 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
293 ; CHECK-NEXT: ret float [[R]]
295 %r = call float @llvm.experimental.constrained.fmul.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
299 define float @fmul_undef_op0_maytrap(float %x) #0 {
300 ; CHECK-LABEL: @fmul_undef_op0_maytrap(
301 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
302 ; CHECK-NEXT: ret float [[R]]
304 %r = call float @llvm.experimental.constrained.fmul.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
308 define float @fmul_undef_op0_upward(float %x) #0 {
309 ; CHECK-LABEL: @fmul_undef_op0_upward(
310 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float undef, float [[X:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
311 ; CHECK-NEXT: ret float [[R]]
313 %r = call float @llvm.experimental.constrained.fmul.f32(float undef, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
317 define float @fmul_undef_op0_defaultfp(float %x) #0 {
318 ; CHECK-LABEL: @fmul_undef_op0_defaultfp(
319 ; CHECK-NEXT: ret float 0x7FF8000000000000
321 %r = call float @llvm.experimental.constrained.fmul.f32(float undef, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
325 define float @fmul_poison_op0_strict(float %x) #0 {
326 ; CHECK-LABEL: @fmul_poison_op0_strict(
327 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float poison, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
328 ; CHECK-NEXT: ret float poison
330 %r = call float @llvm.experimental.constrained.fmul.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
334 define float @fmul_poison_op0_maytrap(float %x) #0 {
335 ; CHECK-LABEL: @fmul_poison_op0_maytrap(
336 ; CHECK-NEXT: ret float poison
338 %r = call float @llvm.experimental.constrained.fmul.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
342 define float @fmul_poison_op0_upward(float %x) #0 {
343 ; CHECK-LABEL: @fmul_poison_op0_upward(
344 ; CHECK-NEXT: ret float poison
346 %r = call float @llvm.experimental.constrained.fmul.f32(float poison, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
350 define float @fmul_poison_op0_defaultfp(float %x) #0 {
351 ; CHECK-LABEL: @fmul_poison_op0_defaultfp(
352 ; CHECK-NEXT: ret float poison
354 %r = call float @llvm.experimental.constrained.fmul.f32(float poison, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
358 define float @fmul_undef_op1_strict(float %x) #0 {
359 ; CHECK-LABEL: @fmul_undef_op1_strict(
360 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
361 ; CHECK-NEXT: ret float [[R]]
363 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
367 define float @fmul_undef_op1_maytrap(float %x) #0 {
368 ; CHECK-LABEL: @fmul_undef_op1_maytrap(
369 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
370 ; CHECK-NEXT: ret float [[R]]
372 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
376 define float @fmul_undef_op1_upward(float %x) #0 {
377 ; CHECK-LABEL: @fmul_undef_op1_upward(
378 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float [[X:%.*]], float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
379 ; CHECK-NEXT: ret float [[R]]
381 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
385 define float @fmul_undef_op1_defaultfp(float %x) #0 {
386 ; CHECK-LABEL: @fmul_undef_op1_defaultfp(
387 ; CHECK-NEXT: ret float 0x7FF8000000000000
389 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float undef, metadata !"round.tonearest", metadata !"fpexcept.ignore")
393 define float @fmul_poison_op1_strict(float %x) #0 {
394 ; CHECK-LABEL: @fmul_poison_op1_strict(
395 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float [[X:%.*]], float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
396 ; CHECK-NEXT: ret float poison
398 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
402 define float @fmul_poison_op1_maytrap(float %x) #0 {
403 ; CHECK-LABEL: @fmul_poison_op1_maytrap(
404 ; CHECK-NEXT: ret float poison
406 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
410 define float @fmul_poison_op1_upward(float %x) #0 {
411 ; CHECK-LABEL: @fmul_poison_op1_upward(
412 ; CHECK-NEXT: ret float poison
414 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float poison, metadata !"round.upward", metadata !"fpexcept.ignore")
418 define float @fmul_poison_op1_defaultfp(float %x) #0 {
419 ; CHECK-LABEL: @fmul_poison_op1_defaultfp(
420 ; CHECK-NEXT: ret float poison
422 %r = call float @llvm.experimental.constrained.fmul.f32(float %x, float poison, metadata !"round.tonearest", metadata !"fpexcept.ignore")
430 define float @fdiv_undef_op0_strict(float %x) #0 {
431 ; CHECK-LABEL: @fdiv_undef_op0_strict(
432 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
433 ; CHECK-NEXT: ret float [[R]]
435 %r = call float @llvm.experimental.constrained.fdiv.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
439 define float @fdiv_undef_op0_maytrap(float %x) #0 {
440 ; CHECK-LABEL: @fdiv_undef_op0_maytrap(
441 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
442 ; CHECK-NEXT: ret float [[R]]
444 %r = call float @llvm.experimental.constrained.fdiv.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
448 define float @fdiv_undef_op0_upward(float %x) #0 {
449 ; CHECK-LABEL: @fdiv_undef_op0_upward(
450 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float undef, float [[X:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
451 ; CHECK-NEXT: ret float [[R]]
453 %r = call float @llvm.experimental.constrained.fdiv.f32(float undef, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
457 define float @fdiv_undef_op0_defaultfp(float %x) #0 {
458 ; CHECK-LABEL: @fdiv_undef_op0_defaultfp(
459 ; CHECK-NEXT: ret float 0x7FF8000000000000
461 %r = call float @llvm.experimental.constrained.fdiv.f32(float undef, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
465 define float @fdiv_poison_op0_strict(float %x) #0 {
466 ; CHECK-LABEL: @fdiv_poison_op0_strict(
467 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float poison, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
468 ; CHECK-NEXT: ret float poison
470 %r = call float @llvm.experimental.constrained.fdiv.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
474 define float @fdiv_poison_op0_maytrap(float %x) #0 {
475 ; CHECK-LABEL: @fdiv_poison_op0_maytrap(
476 ; CHECK-NEXT: ret float poison
478 %r = call float @llvm.experimental.constrained.fdiv.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
482 define float @fdiv_poison_op0_upward(float %x) #0 {
483 ; CHECK-LABEL: @fdiv_poison_op0_upward(
484 ; CHECK-NEXT: ret float poison
486 %r = call float @llvm.experimental.constrained.fdiv.f32(float poison, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
490 define float @fdiv_poison_op0_defaultfp(float %x) #0 {
491 ; CHECK-LABEL: @fdiv_poison_op0_defaultfp(
492 ; CHECK-NEXT: ret float poison
494 %r = call float @llvm.experimental.constrained.fdiv.f32(float poison, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
498 define float @fdiv_undef_op1_strict(float %x) #0 {
499 ; CHECK-LABEL: @fdiv_undef_op1_strict(
500 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
501 ; CHECK-NEXT: ret float [[R]]
503 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
507 define float @fdiv_undef_op1_maytrap(float %x) #0 {
508 ; CHECK-LABEL: @fdiv_undef_op1_maytrap(
509 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
510 ; CHECK-NEXT: ret float [[R]]
512 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
516 define float @fdiv_undef_op1_upward(float %x) #0 {
517 ; CHECK-LABEL: @fdiv_undef_op1_upward(
518 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float [[X:%.*]], float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
519 ; CHECK-NEXT: ret float [[R]]
521 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
525 define float @fdiv_undef_op1_defaultfp(float %x) #0 {
526 ; CHECK-LABEL: @fdiv_undef_op1_defaultfp(
527 ; CHECK-NEXT: ret float 0x7FF8000000000000
529 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float undef, metadata !"round.tonearest", metadata !"fpexcept.ignore")
533 define float @fdiv_poison_op1_strict(float %x) #0 {
534 ; CHECK-LABEL: @fdiv_poison_op1_strict(
535 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fdiv.f32(float [[X:%.*]], float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
536 ; CHECK-NEXT: ret float poison
538 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
542 define float @fdiv_poison_op1_maytrap(float %x) #0 {
543 ; CHECK-LABEL: @fdiv_poison_op1_maytrap(
544 ; CHECK-NEXT: ret float poison
546 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
550 define float @fdiv_poison_op1_upward(float %x) #0 {
551 ; CHECK-LABEL: @fdiv_poison_op1_upward(
552 ; CHECK-NEXT: ret float poison
554 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float poison, metadata !"round.upward", metadata !"fpexcept.ignore")
558 define float @fdiv_poison_op1_defaultfp(float %x) #0 {
559 ; CHECK-LABEL: @fdiv_poison_op1_defaultfp(
560 ; CHECK-NEXT: ret float poison
562 %r = call float @llvm.experimental.constrained.fdiv.f32(float %x, float poison, metadata !"round.tonearest", metadata !"fpexcept.ignore")
570 define float @frem_undef_op0_strict(float %x) #0 {
571 ; CHECK-LABEL: @frem_undef_op0_strict(
572 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
573 ; CHECK-NEXT: ret float [[R]]
575 %r = call float @llvm.experimental.constrained.frem.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
579 define float @frem_undef_op0_maytrap(float %x) #0 {
580 ; CHECK-LABEL: @frem_undef_op0_maytrap(
581 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float undef, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
582 ; CHECK-NEXT: ret float [[R]]
584 %r = call float @llvm.experimental.constrained.frem.f32(float undef, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
588 define float @frem_undef_op0_upward(float %x) #0 {
589 ; CHECK-LABEL: @frem_undef_op0_upward(
590 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float undef, float [[X:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
591 ; CHECK-NEXT: ret float [[R]]
593 %r = call float @llvm.experimental.constrained.frem.f32(float undef, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
597 define float @frem_undef_op0_defaultfp(float %x) #0 {
598 ; CHECK-LABEL: @frem_undef_op0_defaultfp(
599 ; CHECK-NEXT: ret float 0x7FF8000000000000
601 %r = call float @llvm.experimental.constrained.frem.f32(float undef, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
605 define float @frem_poison_op0_strict(float %x) #0 {
606 ; CHECK-LABEL: @frem_poison_op0_strict(
607 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float poison, float [[X:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
608 ; CHECK-NEXT: ret float poison
610 %r = call float @llvm.experimental.constrained.frem.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.strict")
614 define float @frem_poison_op0_maytrap(float %x) #0 {
615 ; CHECK-LABEL: @frem_poison_op0_maytrap(
616 ; CHECK-NEXT: ret float poison
618 %r = call float @llvm.experimental.constrained.frem.f32(float poison, float %x, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
622 define float @frem_poison_op0_upward(float %x) #0 {
623 ; CHECK-LABEL: @frem_poison_op0_upward(
624 ; CHECK-NEXT: ret float poison
626 %r = call float @llvm.experimental.constrained.frem.f32(float poison, float %x, metadata !"round.upward", metadata !"fpexcept.ignore")
630 define float @frem_poison_op0_defaultfp(float %x) #0 {
631 ; CHECK-LABEL: @frem_poison_op0_defaultfp(
632 ; CHECK-NEXT: ret float poison
634 %r = call float @llvm.experimental.constrained.frem.f32(float poison, float %x, metadata !"round.tonearest", metadata !"fpexcept.ignore")
638 define float @frem_undef_op1_strict(float %x) #0 {
639 ; CHECK-LABEL: @frem_undef_op1_strict(
640 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
641 ; CHECK-NEXT: ret float [[R]]
643 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
647 define float @frem_undef_op1_maytrap(float %x) #0 {
648 ; CHECK-LABEL: @frem_undef_op1_maytrap(
649 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float [[X:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
650 ; CHECK-NEXT: ret float [[R]]
652 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
656 define float @frem_undef_op1_upward(float %x) #0 {
657 ; CHECK-LABEL: @frem_undef_op1_upward(
658 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float [[X:%.*]], float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
659 ; CHECK-NEXT: ret float [[R]]
661 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
665 define float @frem_undef_op1_defaultfp(float %x) #0 {
666 ; CHECK-LABEL: @frem_undef_op1_defaultfp(
667 ; CHECK-NEXT: ret float 0x7FF8000000000000
669 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float undef, metadata !"round.tonearest", metadata !"fpexcept.ignore")
673 define float @frem_poison_op1_strict(float %x) #0 {
674 ; CHECK-LABEL: @frem_poison_op1_strict(
675 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.frem.f32(float [[X:%.*]], float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
676 ; CHECK-NEXT: ret float poison
678 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
682 define float @frem_poison_op1_maytrap(float %x) #0 {
683 ; CHECK-LABEL: @frem_poison_op1_maytrap(
684 ; CHECK-NEXT: ret float poison
686 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float poison, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
690 define float @frem_poison_op1_upward(float %x) #0 {
691 ; CHECK-LABEL: @frem_poison_op1_upward(
692 ; CHECK-NEXT: ret float poison
694 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float poison, metadata !"round.upward", metadata !"fpexcept.ignore")
698 define float @frem_poison_op1_defaultfp(float %x) #0 {
699 ; CHECK-LABEL: @frem_poison_op1_defaultfp(
700 ; CHECK-NEXT: ret float poison
702 %r = call float @llvm.experimental.constrained.frem.f32(float %x, float poison, metadata !"round.tonearest", metadata !"fpexcept.ignore")
710 define float @fma_undef_op0_strict(float %x, float %y) #0 {
711 ; CHECK-LABEL: @fma_undef_op0_strict(
712 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float undef, float [[X:%.*]], float [[Y:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
713 ; CHECK-NEXT: ret float [[R]]
715 %r = call float @llvm.experimental.constrained.fma.f32(float undef, float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict")
719 define float @fma_undef_op0_maytrap(float %x, float %y) #0 {
720 ; CHECK-LABEL: @fma_undef_op0_maytrap(
721 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float undef, float [[X:%.*]], float [[Y:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
722 ; CHECK-NEXT: ret float [[R]]
724 %r = call float @llvm.experimental.constrained.fma.f32(float undef, float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
728 define float @fma_undef_op0_upward(float %x, float %y) #0 {
729 ; CHECK-LABEL: @fma_undef_op0_upward(
730 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float undef, float [[X:%.*]], float [[Y:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
731 ; CHECK-NEXT: ret float [[R]]
733 %r = call float @llvm.experimental.constrained.fma.f32(float undef, float %x, float %y, metadata !"round.upward", metadata !"fpexcept.ignore")
737 define float @fma_undef_op0_defaultfp(float %x, float %y) #0 {
738 ; CHECK-LABEL: @fma_undef_op0_defaultfp(
739 ; CHECK-NEXT: ret float 0x7FF8000000000000
741 %r = call float @llvm.experimental.constrained.fma.f32(float undef, float %x, float %y, metadata !"round.tonearest", metadata !"fpexcept.ignore")
745 define float @fma_poison_op0_strict(float %x, float %y) #0 {
746 ; CHECK-LABEL: @fma_poison_op0_strict(
747 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float poison, float [[X:%.*]], float [[Y:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
748 ; CHECK-NEXT: ret float poison
750 %r = call float @llvm.experimental.constrained.fma.f32(float poison, float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict")
754 define float @fma_poison_op0_maytrap(float %x, float %y) #0 {
755 ; CHECK-LABEL: @fma_poison_op0_maytrap(
756 ; CHECK-NEXT: ret float poison
758 %r = call float @llvm.experimental.constrained.fma.f32(float poison, float %x, float %y, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
762 define float @fma_poison_op0_upward(float %x, float %y) #0 {
763 ; CHECK-LABEL: @fma_poison_op0_upward(
764 ; CHECK-NEXT: ret float poison
766 %r = call float @llvm.experimental.constrained.fma.f32(float poison, float %x, float %y, metadata !"round.upward", metadata !"fpexcept.ignore")
770 define float @fma_poison_op0_defaultfp(float %x, float %y) #0 {
771 ; CHECK-LABEL: @fma_poison_op0_defaultfp(
772 ; CHECK-NEXT: ret float poison
774 %r = call float @llvm.experimental.constrained.fma.f32(float poison, float %x, float %y, metadata !"round.tonearest", metadata !"fpexcept.ignore")
778 define float @fma_undef_op1_strict(float %x, float %y) #0 {
779 ; CHECK-LABEL: @fma_undef_op1_strict(
780 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float undef, float [[Y:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
781 ; CHECK-NEXT: ret float [[R]]
783 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float undef, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict")
787 define float @fma_undef_op1_maytrap(float %x, float %y) #0 {
788 ; CHECK-LABEL: @fma_undef_op1_maytrap(
789 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float undef, float [[Y:%.*]], metadata !"round.dynamic", metadata !"fpexcept.maytrap")
790 ; CHECK-NEXT: ret float [[R]]
792 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float undef, float %y, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
796 define float @fma_undef_op1_upward(float %x, float %y) #0 {
797 ; CHECK-LABEL: @fma_undef_op1_upward(
798 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float undef, float [[Y:%.*]], metadata !"round.upward", metadata !"fpexcept.ignore")
799 ; CHECK-NEXT: ret float [[R]]
801 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float undef, float %y, metadata !"round.upward", metadata !"fpexcept.ignore")
805 define float @fma_undef_op1_defaultfp(float %x, float %y) #0 {
806 ; CHECK-LABEL: @fma_undef_op1_defaultfp(
807 ; CHECK-NEXT: ret float 0x7FF8000000000000
809 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float undef, float %y, metadata !"round.tonearest", metadata !"fpexcept.ignore")
813 define float @fma_poison_op1_strict(float %x, float %y) #0 {
814 ; CHECK-LABEL: @fma_poison_op1_strict(
815 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float poison, float [[Y:%.*]], metadata !"round.dynamic", metadata !"fpexcept.strict")
816 ; CHECK-NEXT: ret float poison
818 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float poison, float %y, metadata !"round.dynamic", metadata !"fpexcept.strict")
822 define float @fma_poison_op1_maytrap(float %x, float %y) #0 {
823 ; CHECK-LABEL: @fma_poison_op1_maytrap(
824 ; CHECK-NEXT: ret float poison
826 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float poison, float %y, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
830 define float @fma_poison_op1_upward(float %x, float %y) #0 {
831 ; CHECK-LABEL: @fma_poison_op1_upward(
832 ; CHECK-NEXT: ret float poison
834 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float poison, float %y, metadata !"round.upward", metadata !"fpexcept.ignore")
838 define float @fma_poison_op1_defaultfp(float %x, float %y) #0 {
839 ; CHECK-LABEL: @fma_poison_op1_defaultfp(
840 ; CHECK-NEXT: ret float poison
842 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float poison, float %y, metadata !"round.tonearest", metadata !"fpexcept.ignore")
846 define float @fma_undef_op2_strict(float %x, float %y) #0 {
847 ; CHECK-LABEL: @fma_undef_op2_strict(
848 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float [[Y:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
849 ; CHECK-NEXT: ret float [[R]]
851 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float undef, metadata !"round.dynamic", metadata !"fpexcept.strict")
855 define float @fma_undef_op2_maytrap(float %x, float %y) #0 {
856 ; CHECK-LABEL: @fma_undef_op2_maytrap(
857 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float [[Y:%.*]], float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
858 ; CHECK-NEXT: ret float [[R]]
860 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float undef, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
864 define float @fma_undef_op2_upward(float %x, float %y) #0 {
865 ; CHECK-LABEL: @fma_undef_op2_upward(
866 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float [[Y:%.*]], float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
867 ; CHECK-NEXT: ret float [[R]]
869 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float undef, metadata !"round.upward", metadata !"fpexcept.ignore")
873 define float @fma_undef_op2_defaultfp(float %x, float %y) #0 {
874 ; CHECK-LABEL: @fma_undef_op2_defaultfp(
875 ; CHECK-NEXT: ret float 0x7FF8000000000000
877 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float undef, metadata !"round.tonearest", metadata !"fpexcept.ignore")
881 define float @fma_poison_op2_strict(float %x, float %y) #0 {
882 ; CHECK-LABEL: @fma_poison_op2_strict(
883 ; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.constrained.fma.f32(float [[X:%.*]], float [[Y:%.*]], float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
884 ; CHECK-NEXT: ret float poison
886 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float poison, metadata !"round.dynamic", metadata !"fpexcept.strict")
890 define float @fma_poison_op2_maytrap(float %x, float %y) #0 {
891 ; CHECK-LABEL: @fma_poison_op2_maytrap(
892 ; CHECK-NEXT: ret float poison
894 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float poison, metadata !"round.dynamic", metadata !"fpexcept.maytrap")
898 define float @fma_poison_op2_upward(float %x, float %y) #0 {
899 ; CHECK-LABEL: @fma_poison_op2_upward(
900 ; CHECK-NEXT: ret float poison
902 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float poison, metadata !"round.upward", metadata !"fpexcept.ignore")
906 define float @fma_poison_op2_defaultfp(float %x, float %y) #0 {
907 ; CHECK-LABEL: @fma_poison_op2_defaultfp(
908 ; CHECK-NEXT: ret float poison
910 %r = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float poison, metadata !"round.tonearest", metadata !"fpexcept.ignore")
914 declare float @llvm.experimental.constrained.fadd.f32(float, float, metadata, metadata)
915 declare float @llvm.experimental.constrained.fsub.f32(float, float, metadata, metadata)
916 declare float @llvm.experimental.constrained.fmul.f32(float, float, metadata, metadata)
917 declare float @llvm.experimental.constrained.fdiv.f32(float, float, metadata, metadata)
918 declare float @llvm.experimental.constrained.frem.f32(float, float, metadata, metadata)
919 declare float @llvm.experimental.constrained.fma.f32(float, float, float, metadata, metadata)
921 attributes #0 = { strictfp }