Revert "[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC"
authorStefan Pintilie <stefanp@ca.ibm.com>
Fri, 28 May 2021 16:17:46 +0000 (11:17 -0500)
committerStefan Pintilie <stefanp@ca.ibm.com>
Fri, 28 May 2021 17:21:21 +0000 (12:21 -0500)
This reverts commit 7d418dadf6b1e6fd9bcccf7c5b5e1db74992ee70.

llvm/lib/Transforms/Scalar/LoopDeletion.cpp

index da9a767..acc2056 100644 (file)
@@ -314,8 +314,6 @@ breakBackedgeIfNotTaken(Loop *L, DominatorTree &DT, ScalarEvolution &SE,
     return LoopDeletionResult::Unmodified;
 
   auto *BTC = SE.getBackedgeTakenCount(L);
-  if (!isa<SCEVCouldNotCompute>(BTC) && SE.isKnownNonZero(BTC))
-    return LoopDeletionResult::Unmodified;
   if (!BTC->isZero() && !canProveExitOnFirstIteration(L, DT, SE, LI))
     return LoopDeletionResult::Unmodified;