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 {
1887
1887
void setStepVector (VPValue *V) { setOperand (3 , V); }
1888
1888
1889
1889
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
1891
1891
// induction increment.
1892
- return getNumOperands () == 6 ? getOperand (4 ) : nullptr ;
1892
+ return isUnrolled () ? getOperand (getNumOperands () - 2 ) : nullptr ;
1893
1893
}
1894
1894
1895
1895
// / Returns the first defined value as TruncInst, if it is one or nullptr
@@ -1911,8 +1911,11 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
1911
1911
// / the last unrolled part, if it exists. Returns itself if unrolling did not
1912
1912
// / take place.
1913
1913
VPValue *getLastUnrolledPartOperand () {
1914
- return getNumOperands () == 6 ? getOperand (5 ) : this ;
1914
+ return isUnrolled () ? getOperand (getNumOperands () - 1 ) : this ;
1915
1915
}
1916
+
1917
+ private:
1918
+ bool isUnrolled () const { return getNumOperands () == 6 ; }
1916
1919
};
1917
1920
1918
1921
class VPWidenPointerInductionRecipe : public VPWidenInductionRecipe ,
You can’t perform that action at this time.
0 commit comments