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 {
17781778 // / If it is nullptr no memory runtime checks have been generated.
17791779 Value *MemRuntimeCheckCond = nullptr ;
17801780
1781- // / True if any checks have been added.
1782- bool AddedAnyChecks = false ;
1783-
17841781 DominatorTree *DT;
17851782 LoopInfo *LI;
17861783 TargetTransformInfo *TTI;
@@ -2044,7 +2041,6 @@ class GeneratedRTChecks {
20442041 if (AddBranchWeights)
20452042 setBranchWeights (BI, SCEVCheckBypassWeights, /* IsExpected=*/ false );
20462043 ReplaceInstWithInst (SCEVCheckBlock->getTerminator (), &BI);
2047- AddedAnyChecks = true ;
20482044 return SCEVCheckBlock;
20492045 }
20502046
@@ -2072,12 +2068,15 @@ class GeneratedRTChecks {
20722068 MemCheckBlock->getTerminator ()->setDebugLoc (
20732069 Pred->getTerminator ()->getDebugLoc ());
20742070
2075- AddedAnyChecks = true ;
20762071 return MemCheckBlock;
20772072 }
20782073
20792074 // / 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+ }
20812080};
20822081} // namespace
20832082
You can’t perform that action at this time.
0 commit comments