File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1778,9 +1778,6 @@ class GeneratedRTChecks {
1778
1778
// / If it is nullptr no memory runtime checks have been generated.
1779
1779
Value *MemRuntimeCheckCond = nullptr ;
1780
1780
1781
- // / True if any checks have been added.
1782
- bool AddedAnyChecks = false ;
1783
-
1784
1781
DominatorTree *DT;
1785
1782
LoopInfo *LI;
1786
1783
TargetTransformInfo *TTI;
@@ -2044,7 +2041,6 @@ class GeneratedRTChecks {
2044
2041
if (AddBranchWeights)
2045
2042
setBranchWeights (BI, SCEVCheckBypassWeights, /* IsExpected=*/ false );
2046
2043
ReplaceInstWithInst (SCEVCheckBlock->getTerminator (), &BI);
2047
- AddedAnyChecks = true ;
2048
2044
return SCEVCheckBlock;
2049
2045
}
2050
2046
@@ -2072,12 +2068,15 @@ class GeneratedRTChecks {
2072
2068
MemCheckBlock->getTerminator ()->setDebugLoc (
2073
2069
Pred->getTerminator ()->getDebugLoc ());
2074
2070
2075
- AddedAnyChecks = true ;
2076
2071
return MemCheckBlock;
2077
2072
}
2078
2073
2079
2074
// / Return true if any runtime checks have been added
2080
- bool hasChecks () const { return AddedAnyChecks; }
2075
+ bool hasChecks () const {
2076
+ using namespace llvm ::PatternMatch;
2077
+ return (SCEVCheckCond && !match (SCEVCheckCond, m_ZeroInt ())) ||
2078
+ MemRuntimeCheckCond;
2079
+ }
2081
2080
};
2082
2081
} // namespace
2083
2082
You can’t perform that action at this time.
0 commit comments