[llvm] [LV][EVL]Explicitly model AVL as sub, original TC, EVL_PHI. (PR #108869)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 00:34:46 PDT 2024


================
@@ -1417,9 +1418,13 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
   // Create the ExplicitVectorLengthPhi recipe in the main loop.
   auto *EVLPhi = new VPEVLBasedIVPHIRecipe(StartV, DebugLoc());
   EVLPhi->insertAfter(CanonicalIVPHI);
-  auto *VPEVL = new VPInstruction(VPInstruction::ExplicitVectorLength,
-                                  {EVLPhi, Plan.getTripCount()});
-  VPEVL->insertBefore(*Header, Header->getFirstNonPhi());
+  // Compute original TC - IV as the AVL (requested vector length).
----------------
ayalz wrote:

nit: the TODO to handle MaxSafeDist should move from GetEVL above to here where the AVL argument is prepared for EVL.

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


More information about the llvm-commits mailing list