[llvm] [VPlan] Emit VPVectorEndPointerRecipe for reverse interleave pointer adjustment (PR #144864)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 23:59:20 PDT 2025
================
@@ -2512,6 +2512,21 @@ void VPlanTransforms::createInterleaveGroups(
Addr = InBounds ? B.createInBoundsPtrAdd(InsertPos->getAddr(), OffsetVPV)
: B.createPtrAdd(InsertPos->getAddr(), OffsetVPV);
}
+ // If the group is reverse, adjust the index to refer to the last vector
+ // lane instead of the first. We adjust the index from the first vector
+ // lane, rather than directly getting the pointer for lane VF - 1, because
+ // the pointer operand of the interleaved access is supposed to be uniform.
+ if (IG->isReverse()) {
+ auto *GEP = dyn_cast<GetElementPtrInst>(
----------------
Mel-Chen wrote:
Removed, thanks.
736b5a3d7294fcaae0628b41f6770f3b33dd98af
https://github.com/llvm/llvm-project/pull/144864
More information about the llvm-commits
mailing list