Commit f2a97a4
committed
[InstSimplify] Treat float binop with identity as refining
If x if NaN, then fmul (x, 1) may produce a different NaN value.
Our float semantics explicitly permit folding fmul (x, 1) to x,
but we can't do this when we're replacing a select input, as
selects are supposed to preserve the exact bitwise value.1 parent 02328e0 commit f2a97a4
File tree
2 files changed
+18
-9
lines changed- llvm
- lib/Analysis
- test/Transforms/InstSimplify
2 files changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4345 | 4345 | | |
4346 | 4346 | | |
4347 | 4347 | | |
4348 | | - | |
4349 | | - | |
4350 | | - | |
4351 | | - | |
4352 | | - | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
4353 | 4356 | | |
4354 | 4357 | | |
4355 | 4358 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
120 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
140 | | - | |
141 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
0 commit comments