[llvm] [LV] Use wide lane masks as the canonical form when tail-folding & interleaving (PR #209484)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 02:41:13 PDT 2026
================
@@ -2035,103 +2035,41 @@ static bool isConditionTrueViaVFAndUF(VPValue *Cond, VPlan &Plan,
return SE.isKnownPredicate(CmpInst::ICMP_EQ, VectorTripCount, C);
}
-/// Try to replace multiple active lane masks used for control flow with
-/// a single, wide active lane mask instruction followed by multiple
-/// extract subvector intrinsics. This applies to the active lane mask
-/// instructions both in the loop and in the preheader.
-/// Incoming values of all ActiveLaneMaskPHIs are updated to use the
-/// new extracts from the first active lane mask, which has it's last
-/// operand (multiplier) set to UF.
-static bool tryToReplaceALMWithWideALM(VPlan &Plan, ElementCount VF,
- unsigned UF) {
- if (!EnableWideActiveLaneMask || !VF.isVector() || UF == 1)
+static bool replaceMaskWithCompare(VPlan &Plan, ElementCount BestVF) {
----------------
david-arm wrote:
nit: Is it worth adding some comments explaining what this function is doing? It looks like an optimisation.
https://github.com/llvm/llvm-project/pull/209484
More information about the llvm-commits
mailing list