From dd226803c220f02a5987f0ee9f9ac3ffe2b35c09 Mon Sep 17 00:00:00 2001 From: Stefan Pintilie Date: Fri, 28 May 2021 11:17:46 -0500 Subject: [PATCH] Revert "[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC" This reverts commit 7d418dadf6b1e6fd9bcccf7c5b5e1db74992ee70. --- llvm/lib/Transforms/Scalar/LoopDeletion.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp index da9a767..acc2056 100644 --- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp @@ -314,8 +314,6 @@ breakBackedgeIfNotTaken(Loop *L, DominatorTree &DT, ScalarEvolution &SE, return LoopDeletionResult::Unmodified; auto *BTC = SE.getBackedgeTakenCount(L); - if (!isa(BTC) && SE.isKnownNonZero(BTC)) - return LoopDeletionResult::Unmodified; if (!BTC->isZero() && !canProveExitOnFirstIteration(L, DT, SE, LI)) return LoopDeletionResult::Unmodified; -- 2.7.4