[llvm] [VPlan] Implement interleaving as VPlan-to-VPlan transform. (PR #95842)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 13:03:57 PDT 2024
================
@@ -1967,9 +1993,17 @@ class VPWidenIntOrFpInductionRecipe : public VPHeaderPHIRecipe {
Type *getScalarType() const {
return Trunc ? Trunc->getType() : IV->getType();
}
+
+ /// Returns the VPValue representing the value of this induction at
+ /// the last unrolled part, if it exists. Returns itself if unrolling did not
+ /// take place.
+ VPValue *getLastUnrolledPartOperand() {
+ return getNumOperands() == 5 ? getOperand(4) : this;
+ }
----------------
ayalz wrote:
Better place this accessor for operand 4 above, after getSplatVFValue(), completing the accessors for operands 1,2 and 3.
https://github.com/llvm/llvm-project/pull/95842
More information about the llvm-commits
mailing list