Commit 93099c7
committed
[InstCombine] allow more fast-math-flags to propagate in fneg-of-select fold
We were conservatively intersecting flags, but we can take the union here
because forbidden special values (nsz/nnan/ninf) are not altered by fneg.
So if they were guaranteed not present on the select or fneg, then they
are guaranteed not present on the new select. Alive2 appears to agree on
the test diffs (reduced to not include irrelevant flags like reassoc):
https://alive2.llvm.org/ce/z/ViqqrO
This prevents a potential regression if we tighten up the FMF behavior
for fabs with NAN as suggested in issue #59279.1 parent 8f1e11c commit 93099c7
File tree
2 files changed
+9
-5
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
2411 | | - | |
2412 | | - | |
| 2411 | + | |
| 2412 | + | |
2413 | 2413 | | |
2414 | 2414 | | |
2415 | | - | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2416 | 2419 | | |
2417 | 2420 | | |
2418 | 2421 | | |
| 2422 | + | |
2419 | 2423 | | |
2420 | 2424 | | |
2421 | 2425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
| 632 | + | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
| 775 | + | |
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
| |||
0 commit comments