Commit f24da99
committed
[llvm] Don't combine repeated fp divisors with subnormals
DAGCombiner performs this rewrite:
(a / D; b / D;) -> (recip = 1.0 / D; a * recip; b * recip)
However, when D is subnormal, this produces a*inf and b*inf.
With fast-math flags enabled, this creates poisons that break
the rewritten consumers. Guard this transformation with checks
for subnormal operands.1 parent 4355356 commit f24da99
File tree
2 files changed
+32
-0
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/X86
2 files changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18235 | 18235 | | |
18236 | 18236 | | |
18237 | 18237 | | |
| 18238 | + | |
| 18239 | + | |
| 18240 | + | |
| 18241 | + | |
| 18242 | + | |
| 18243 | + | |
| 18244 | + | |
| 18245 | + | |
| 18246 | + | |
| 18247 | + | |
18238 | 18248 | | |
18239 | 18249 | | |
18240 | 18250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments