[llvm] a19cbc4 - [VPlan] Rename VectorEndPointer's IndexedTy to SourceElementTy (NFC) (#178856)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 1 03:30:31 PST 2026
Author: Ramkumar Ramachandra
Date: 2026-02-01T11:30:26Z
New Revision: a19cbc4b770049838e2727ea02424f408f00dda4
URL: https://github.com/llvm/llvm-project/commit/a19cbc4b770049838e2727ea02424f408f00dda4
DIFF: https://github.com/llvm/llvm-project/commit/a19cbc4b770049838e2727ea02424f408f00dda4.diff
LOG: [VPlan] Rename VectorEndPointer's IndexedTy to SourceElementTy (NFC) (#178856)
For consistency with IR terminology.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index bccf3c61a3285..ae6988d86e194 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1993,27 +1993,28 @@ class LLVM_ABI_FOR_TEST VPWidenGEPRecipe : public VPRecipeWithIRFlags {
};
/// A recipe to compute a pointer to the last element of each part of a widened
-/// memory access for widened memory accesses of IndexedTy. Used for
+/// memory access for widened memory accesses of SourceElementTy. Used for
/// VPWidenMemoryRecipes or VPInterleaveRecipes that are reversed.
class VPVectorEndPointerRecipe : public VPRecipeWithIRFlags,
public VPUnrollPartAccessor<2> {
- Type *IndexedTy;
+ Type *SourceElementTy;
/// The constant stride of the pointer computed by this recipe, expressed in
- /// units of IndexedTy.
+ /// units of SourceElementTy.
int64_t Stride;
public:
- VPVectorEndPointerRecipe(VPValue *Ptr, VPValue *VF, Type *IndexedTy,
+ VPVectorEndPointerRecipe(VPValue *Ptr, VPValue *VF, Type *SourceElementTy,
int64_t Stride, GEPNoWrapFlags GEPFlags, DebugLoc DL)
: VPRecipeWithIRFlags(VPRecipeBase::VPVectorEndPointerSC,
ArrayRef<VPValue *>({Ptr, VF}), GEPFlags, DL),
- IndexedTy(IndexedTy), Stride(Stride) {
+ SourceElementTy(SourceElementTy), Stride(Stride) {
assert(Stride < 0 && "Stride must be negative");
}
VP_CLASSOF_IMPL(VPRecipeBase::VPVectorEndPointerSC)
+ Type *getSourceElementType() const { return SourceElementTy; }
VPValue *getVFValue() { return getOperand(1); }
const VPValue *getVFValue() const { return getOperand(1); }
@@ -2041,9 +2042,9 @@ class VPVectorEndPointerRecipe : public VPRecipeWithIRFlags,
}
VPVectorEndPointerRecipe *clone() override {
- return new VPVectorEndPointerRecipe(getOperand(0), getVFValue(), IndexedTy,
- Stride, getGEPNoWrapFlags(),
- getDebugLoc());
+ return new VPVectorEndPointerRecipe(getOperand(0), getVFValue(),
+ getSourceElementType(), Stride,
+ getGEPNoWrapFlags(), getDebugLoc());
}
protected:
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index d6bb43629c03b..6fb4225f32800 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -2612,9 +2612,9 @@ void VPVectorEndPointerRecipe::execute(VPTransformState &State) {
LastLane =
Builder.CreateMul(ConstantInt::getSigned(IndexTy, Stride), LastLane);
Value *Ptr = State.get(getOperand(0), VPLane(0));
- Value *ResultPtr =
- Builder.CreateGEP(IndexedTy, Ptr, NumElt, "", getGEPNoWrapFlags());
- ResultPtr = Builder.CreateGEP(IndexedTy, ResultPtr, LastLane, "",
+ Value *ResultPtr = Builder.CreateGEP(getSourceElementType(), Ptr, NumElt, "",
+ getGEPNoWrapFlags());
+ ResultPtr = Builder.CreateGEP(getSourceElementType(), ResultPtr, LastLane, "",
getGEPNoWrapFlags());
State.set(this, ResultPtr, /*IsScalar*/ true);
More information about the llvm-commits
mailing list