[llvm] [VPlan] Remove VPVectorPointer for part 0 after unrolling. (PR #149735)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 04:04:29 PDT 2025
================
@@ -1837,6 +1837,10 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags,
getGEPNoWrapFlags(), getDebugLoc());
}
+ /// Return true if this VPVectorPointerRecipe corresponds to part 0. Note that
+ /// this is only accurate after the VPlan has been unrolled.
+ bool isFirstPart() const { return getUnrollPart(*this) == 0; }
----------------
lukel97 wrote:
FWIW in #148274 I was planning on making the VPUnrollPartAccessor methods public, similar to VPPHIAccessors. If that lands then we wouldn't need to add a method on VPVectorPointerRecipe, we could just call `R.getUnrollPart(R) == 0` directly.
https://github.com/llvm/llvm-project/pull/149735
More information about the llvm-commits
mailing list