SimplifyCFG.cpp - remove dead early-return code added at rGcc63203908da. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 6 Jun 2021 13:15:11 +0000 (14:15 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 6 Jun 2021 13:15:11 +0000 (14:15 +0100)
We've already checked that ScanIdx == 0 a few lines above.

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

index c4c828c..ee86326 100644 (file)
@@ -2059,10 +2059,6 @@ static bool SinkCommonCodeFromPredecessors(BasicBlock *BB,
     return NumPHIInsts <= 1;
   };
 
-  // If no instructions can be sunk, early-return.
-  if (ScanIdx == 0)
-    return false;
-
   // We've determined that we are going to sink last ScanIdx instructions,
   // and recorded them in InstructionsToSink. Now, some instructions may be
   // unprofitable to sink. But that determination depends on the instructions