[llvm] [VPlan] Extract reverse operation for reverse accesses (PR #146525)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 18:14:55 PDT 2025


================
@@ -917,6 +918,8 @@ Value *VPInstruction::generate(VPTransformState &State) {
 
     return Res;
   }
+  case VPInstruction::Reverse:
+    return Builder.CreateVectorReverse(State.get(getOperand(0)), "reverse");
----------------
lukel97 wrote:

> Even though the function is named optimizeMaskToEVL, EVL transform for both WidenLoadRecipe and ReverseRecipe seems necessary for correctness.

At the moment yes because of how we replace VPEndPointerRecipe globally, I've opened up #152542 for this. 


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


More information about the llvm-commits mailing list