[llvm] [LV] Use wide lane masks as the canonical form when tail-folding & interleaving (PR #209484)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 04:57:41 PDT 2026
================
@@ -472,6 +478,19 @@ void UnrollState::unrollBlock(VPBlockBase *VPB) {
continue;
}
+ if (match(&R,
+ m_ActiveLaneMask(m_VPValue(), m_VPValue(Op1), m_VPValue(Op2)))) {
+ auto *ALM = cast<VPInstruction>(&R);
+ auto *User = ALM->getSingleUser();
+ // Widen ActiveLaneMask when used for control flow.
+ if (User && match(User, m_ExtractSubvectorForPart(m_Specific(ALM),
+ m_ZeroInt()))) {
----------------
paulwalker-arm wrote:
I can only reviewer what I see, which at the moment looks fragile because the correct interpretation of a VPInstruction requires you to look at its users. If your use case introduces a third interpretation then perhaps that suggest another operation, or the active-lane-mask instructions requires more internal state to identify the specific operation. It's hard without knowing the details and personally I think this PR should stand on its own. If your use case then requires alterations then so be it.
https://github.com/llvm/llvm-project/pull/209484
More information about the llvm-commits
mailing list