[llvm] [AArch64][ARM] Move ARM-specific InstCombine transforms to new module (PR #169589)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 28 09:22:16 PST 2025
valadaptive wrote:
Putting them in Transforms/Utils is a lot simpler, so I've moved them there. What's the policy for stacked PRs when an earlier PR in the "stack" is modified; do I merge the changes into the later one?
A target-agnostic variable vector shuffle *may* obviate this transform, depending on how it's implemented. If there's a variable vector shuffle that accepts up to four source operands, the same as the `tbl` intrinsics, all the target-specific "convert my bespoke shuffle intrinsic into a shufflevector" optimizations could be replaced.
If the hypothetical variable vector shuffle accepts *fewer* than four source operands, you could convert some subset of `tbl` intrinsics to variable vector shuffles, but that would miss out on optimizations where e.g. multiple source operands are the same, and you can adjust the statically-known shuffle indices to point to at most two sources.
Either way, I think coming up with a satisfactory design for such an operation will take a while, and implementing it for all targets + ensuring it can be optimized will take longer still. I think https://github.com/llvm/llvm-project/pull/169748 could be landed much earlier, and the regression tests added there are a useful way to ensure that whatever "variable shufflevector" we come up with has equivalent optimization potential.
https://github.com/llvm/llvm-project/pull/169589
More information about the llvm-commits
mailing list