[llvm] [LV] Use wide lane masks as the canonical form when tail-folding & interleaving (PR #209484)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 23:29:26 PDT 2026


================
@@ -2198,7 +2142,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
   assert(Plan.hasVF(BestVF) && "BestVF is not available in Plan");
   assert(Plan.hasUF(BestUF) && "BestUF is not available in Plan");
 
-  bool MadeChange = tryToReplaceALMWithWideALM(Plan, BestVF, BestUF);
+  bool MadeChange = replaceMaskWithCompare(Plan, BestVF);
   MadeChange |= simplifyBranchConditionForVFAndUF(Plan, BestVF, BestUF, PSE);
----------------
fhahn wrote:

I think the order here needs to be swapped to avoid regressing the branch optimization https://github.com/llvm/llvm-project/pull/216257

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


More information about the llvm-commits mailing list