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 @@ -1863,9 +1863,9 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
18631863 void setStepVector (VPValue *V) { setOperand (3 , V); }
18641864
18651865 VPValue *getSplatVFValue () {
1866- // If the recipe has been unrolled (4 operands) , return the VPValue for the
1866+ // If the recipe has been unrolled, return the VPValue for the
18671867 // induction increment.
1868- return getNumOperands () == 6 ? getOperand (4 ) : nullptr ;
1868+ return isUnrolled () ? getOperand (getNumOperands () - 2 ) : nullptr ;
18691869 }
18701870
18711871 // / Returns the first defined value as TruncInst, if it is one or nullptr
@@ -1887,8 +1887,11 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
18871887 // / the last unrolled part, if it exists. Returns itself if unrolling did not
18881888 // / take place.
18891889 VPValue *getLastUnrolledPartOperand () {
1890- return getNumOperands () == 6 ? getOperand (5 ) : this ;
1890+ return isUnrolled () ? getOperand (getNumOperands () - 1 ) : this ;
18911891 }
1892+
1893+ private:
1894+ bool isUnrolled () const { return getNumOperands () == 6 ; }
18921895};
18931896
18941897class VPWidenPointerInductionRecipe : public VPWidenInductionRecipe ,
You can’t perform that action at this time.
0 commit comments