[llvm] [VectorCombine] Add foldShuffleToIdentity (PR #88693)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 02:19:11 PDT 2024


davemgreen wrote:

The trivial cases were just added for testing - many of them are already handled by instcombine. Some of those combines in instcombine are the ones causing the problem, as they already move shuffles through binops without considering the costs and breaking the canonical patterns for interleaving loads.

We were previously trying to fix that in the InterleavedAccess (through replaceBinOpShuffles), but that starts to become impossible as more and more folds happen in the mid-end.

That is separate from this patch though, which shouldn't create the same problems of breaking interleaving patterns without replacing them with identity shuffles, which should always be an improvement.

https://github.com/llvm/llvm-project/pull/88693


More information about the llvm-commits mailing list