[llvm] [AArch64][SVE] Support lowering fixed-length BUILD_VECTORS to ZIPs (PR #111698)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 06:34:38 PDT 2024
MacDue wrote:
> This PR is effectively expanding `BUILD_VECTOR` with custom shuffles and so I'm starting to wonder if we're at the point of reconsidering disabling `shouldExpandBuildVectorWithShuffles`. This was initial done to simplify the path to SVE VLS code generation but at its core there was no other reason to disable it.
>From my quick investigation, the SVE lowering for fixed-length vector shuffles only recognizes things that can be directly done in a single ZIP instruction (which is enough only for the two-element case). It falls back to `BUILD_VECTOR` when attempting to lower shuffles with more than two elements (so right now, if you enable this, you can fall into an infinite loop).
So enabling this in `BUILD_VECTOR` seems equivalent to handling it with shuffles since unsupported shuffles are expanded to `BUILD_VECTOR` anyway (you can see in some of the test updates where this change has been able to handle shuffles).
https://github.com/llvm/llvm-project/pull/111698
More information about the llvm-commits
mailing list