File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1887,9 +1887,9 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
18871887 void setStepVector (VPValue *V) { setOperand (3 , V); }
18881888
18891889 VPValue *getSplatVFValue () {
1890- // If the recipe has been unrolled (4 operands) , return the VPValue for the
1890+ // If the recipe has been unrolled, return the VPValue for the
18911891 // induction increment.
1892- return getNumOperands () == 6 ? getOperand (4 ) : nullptr ;
1892+ return isUnrolled () ? getOperand (getNumOperands () - 2 ) : nullptr ;
18931893 }
18941894
18951895 // / Returns the first defined value as TruncInst, if it is one or nullptr
@@ -1911,8 +1911,11 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
19111911 // / the last unrolled part, if it exists. Returns itself if unrolling did not
19121912 // / take place.
19131913 VPValue *getLastUnrolledPartOperand () {
1914- return getNumOperands () == 6 ? getOperand (5 ) : this ;
1914+ return isUnrolled () ? getOperand (getNumOperands () - 1 ) : this ;
19151915 }
1916+
1917+ private:
1918+ bool isUnrolled () const { return getNumOperands () == 6 ; }
19161919};
19171920
19181921class VPWidenPointerInductionRecipe : public VPWidenInductionRecipe ,
You can’t perform that action at this time.
0 commit comments