[llvm] 59d938e - [NFC] Formatting fix

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 22:51:21 PDT 2021


Author: Max Kazantsev
Date: 2021-05-27T12:50:54+07:00
New Revision: 59d938e649e62db0cef4903d495e838fbc6a6eb8

URL: https://github.com/llvm/llvm-project/commit/59d938e649e62db0cef4903d495e838fbc6a6eb8
DIFF: https://github.com/llvm/llvm-project/commit/59d938e649e62db0cef4903d495e838fbc6a6eb8.diff

LOG: [NFC] Formatting fix

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/LoopDeletion.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
index 14eb07ab17e6..cd2a3fc48e3b 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -283,16 +283,17 @@ 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);
   }


        


More information about the llvm-commits mailing list