Commit 536cb1f
authored
[InstCombine] Fix for folding select-like
Folding a select-like `shufflevector` into a floating point binary
operators can only be done if the result is preserved for both case. In
particular, if the common operand of the `shufflevector` and the
floating point binary operator can be a NaN, then the transformation
won't preserve the result value.shufflevector into floating point binary operators. (#85452)1 parent 3eb58d1 commit 536cb1f
File tree
3 files changed
+45
-9
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
3 files changed
+45
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2135 | 2135 | | |
2136 | 2136 | | |
2137 | 2137 | | |
2138 | | - | |
| 2138 | + | |
| 2139 | + | |
2139 | 2140 | | |
2140 | 2141 | | |
2141 | 2142 | | |
| |||
2159 | 2160 | | |
2160 | 2161 | | |
2161 | 2162 | | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
2162 | 2176 | | |
2163 | 2177 | | |
2164 | 2178 | | |
| |||
2175 | 2189 | | |
2176 | 2190 | | |
2177 | 2191 | | |
2178 | | - | |
2179 | 2192 | | |
2180 | 2193 | | |
2181 | 2194 | | |
| |||
2241 | 2254 | | |
2242 | 2255 | | |
2243 | 2256 | | |
2244 | | - | |
| 2257 | + | |
| 2258 | + | |
2245 | 2259 | | |
2246 | 2260 | | |
2247 | 2261 | | |
| |||
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
340 | 351 | | |
341 | 352 | | |
342 | 353 | | |
| |||
359 | 370 | | |
360 | 371 | | |
361 | 372 | | |
362 | | - | |
| 373 | + | |
363 | 374 | | |
364 | 375 | | |
365 | 376 | | |
| |||
380 | 391 | | |
381 | 392 | | |
382 | 393 | | |
383 | | - | |
| 394 | + | |
384 | 395 | | |
385 | 396 | | |
386 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
340 | 351 | | |
341 | 352 | | |
342 | 353 | | |
| |||
359 | 370 | | |
360 | 371 | | |
361 | 372 | | |
362 | | - | |
| 373 | + | |
363 | 374 | | |
364 | 375 | | |
365 | 376 | | |
| |||
380 | 391 | | |
381 | 392 | | |
382 | 393 | | |
383 | | - | |
| 394 | + | |
384 | 395 | | |
385 | 396 | | |
386 | 397 | | |
| |||
0 commit comments