File tree 1 file changed +6
-3
lines changed
llvm/lib/Transforms/Vectorize
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 {
1863
1863
void setStepVector (VPValue *V) { setOperand (3 , V); }
1864
1864
1865
1865
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
1867
1867
// induction increment.
1868
- return getNumOperands () == 6 ? getOperand (4 ) : nullptr ;
1868
+ return isUnrolled () ? getOperand (getNumOperands () - 2 ) : nullptr ;
1869
1869
}
1870
1870
1871
1871
// / Returns the first defined value as TruncInst, if it is one or nullptr
@@ -1887,8 +1887,11 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
1887
1887
// / the last unrolled part, if it exists. Returns itself if unrolling did not
1888
1888
// / take place.
1889
1889
VPValue *getLastUnrolledPartOperand () {
1890
- return getNumOperands () == 6 ? getOperand (5 ) : this ;
1890
+ return isUnrolled () ? getOperand (getNumOperands () - 1 ) : this ;
1891
1891
}
1892
+
1893
+ private:
1894
+ bool isUnrolled () const { return getNumOperands () == 6 ; }
1892
1895
};
1893
1896
1894
1897
class VPWidenPointerInductionRecipe : public VPWidenInductionRecipe ,
You can’t perform that action at this time.
0 commit comments