Commit 70eed33
[InstCombine] Do not combine shuffle+bitcast if the bitcast is eliminable. (llvm#135769)
If we are attempting to combine shuffle+bitcast but the bitcast is
pairable with a subsequent bitcast, we should not fold the shuffle as
doing so can block further simplifications.
The motivation for this is a long-standing regression affecting SIMDe on
AArch64, introduced indirectly by the AlwaysInliner (1a2e77c). Some
reproducers:
* https://godbolt.org/z/53qx18s6M
* https://godbolt.org/z/o5e43h5M7
(cherry picked from commit c91c3f9)1 parent 6ddf2e5 commit 70eed33
File tree
2 files changed
+47
-4
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+47
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3029 | 3029 | | |
3030 | 3030 | | |
3031 | 3031 | | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | | - | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
3036 | 3044 | | |
3037 | 3045 | | |
3038 | 3046 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
0 commit comments