[llvm] [LV, VP]VP intrinsics support for the Loop Vectorizer + adding new tail-folding mode using EVL. (PR #76172)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 09:10:13 PST 2024


================
@@ -9430,7 +9552,21 @@ void VPWidenMemoryInstructionRecipe::execute(VPTransformState &State) {
   State.setDebugLocFrom(LI->getDebugLoc());
   for (unsigned Part = 0; Part < State.UF; ++Part) {
     Value *NewLI;
-    if (CreateGatherScatter) {
+    if (State.EVL) {
+      assert(State.UF == 1 && "Expected only UF == 1 when vectorizing with "
+                              "explicit vector length.");
+      Value *EVL = State.get(State.EVL, VPIteration(0, 0));
----------------
fhahn wrote:

Would be good to assert that State.EVL is an EVL VPInstruction here and above, unless that's done elsewhere already

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


More information about the llvm-commits mailing list