[llvm] [VPlan] Extract reverse operation for reverse accesses (PR #146525)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 08:05:21 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:
My preference is to add a VF operand to reverse.
I think we should try to avoid the notion of "transforming to an EVL recipe" as we're mixing up what transforms are needed for correctness and what are optimisations to remove the header mask.
E.g. transforming fixed-order-recurrences to use vp.splice is needed, but replacing a header-masked VPWidenLoadRecipe with VPWidenEVLLoadRecipe shouldn't be.
https://github.com/llvm/llvm-project/pull/146525
More information about the llvm-commits
mailing list