[llvm] df3e73d - [LoopDeletion] Simplify. NFC
    Fangrui Song via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb 13 22:49:14 PST 2023
    
    
  
Author: Fangrui Song
Date: 2023-02-13T22:49:09-08:00
New Revision: df3e73dabb5b8103931b2360fe0740ccaa262319
URL: https://github.com/llvm/llvm-project/commit/df3e73dabb5b8103931b2360fe0740ccaa262319
DIFF: https://github.com/llvm/llvm-project/commit/df3e73dabb5b8103931b2360fe0740ccaa262319.diff
LOG: [LoopDeletion] Simplify. NFC
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 7e4dbace043a7..42fc69a1db921 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -73,7 +73,7 @@ static bool isLoopDead(Loop *L, ScalarEvolution &SE,
   // of the loop.
   bool AllEntriesInvariant = true;
   bool AllOutgoingValuesSame = true;
-  if (!L->hasNoExitBlocks()) {
+  if (ExitBlock) {
     for (PHINode &P : ExitBlock->phis()) {
       Value *incoming = P.getIncomingValueForBlock(ExitingBlocks[0]);
 
        
    
    
More information about the llvm-commits
mailing list