Revert "[NFC] Formatting fix"
authorStefan Pintilie <stefanp@ca.ibm.com>
Fri, 28 May 2021 16:34:02 +0000 (11:34 -0500)
committerStefan Pintilie <stefanp@ca.ibm.com>
Fri, 28 May 2021 17:21:22 +0000 (12:21 -0500)
This reverts commit 59d938e649e62db0cef4903d495e838fbc6a6eb8.

llvm/lib/Transforms/Scalar/LoopDeletion.cpp

index cd2a3fc..14eb07a 100644 (file)
@@ -283,17 +283,16 @@ static bool canProveExitOnFirstIteration(Loop *L, DominatorTree &DT,
     // Can we prove constant true or false for this condition?
     const SCEV *LHSS = getSCEVOnFirstIteration(LHS, L, SE, FirstIterSCEV);
     const SCEV *RHSS = getSCEVOnFirstIteration(RHS, L, SE, FirstIterSCEV);
-    // Only query for liveness of in-loop edge if another successor is also
-    // in-loop.
-    // TODO: isKnownPredicateAt is more powerful, but it's too compile time
-    // consuming. So we avoid using it here.
-    if (L->contains(Term->getSuccessor(1)) &&
-        SE.isKnownPredicate(Pred, LHSS, RHSS))
-      MarkLiveEdge(BB, Term->getSuccessor(0));
+        // Only query for liveness of in-loop edge if another successor is also
+        // in-loop.
+        // TODO: isKnownPredicateAt is more powerful, but it's too compile time
+        // consuming. So we avoid using it here.
+        if (L->contains(Term->getSuccessor(1)) &&
+            SE.isKnownPredicate(Pred, LHSS, RHSS))
+        MarkLiveEdge(BB, Term->getSuccessor(0));
     else if (L->contains(Term->getSuccessor(0)) &&
              SE.isKnownPredicate(ICmpInst::getInversePredicate(Pred), LHSS,
-                                 RHSS))
-      MarkLiveEdge(BB, Term->getSuccessor(1));
+                                 RHSS)) MarkLiveEdge(BB, Term->getSuccessor(1));
     else
       MarkAllSuccessorsLive(BB);
   }