Remove a check that can no longer be true, after r84803.
authorBob Wilson <bob.wilson@apple.com>
Tue, 16 Mar 2010 23:40:32 +0000 (23:40 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 16 Mar 2010 23:40:32 +0000 (23:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98694 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BranchFolding.cpp

index 13ae43daf6ddda2d8eadda01420e811546b9a1e5..b45abc7b97d0cae01bbc34b390166316a4d9b638 100644 (file)
@@ -1143,22 +1143,6 @@ ReoptimizeBlock:
           !IsBetterFallthrough(PriorTBB, MBB))
         DoTransform = false;
 
-      // We don't want to do this transformation if we have control flow like:
-      //   br cond BB2
-      // BB1:
-      //   ..
-      //   jmp BBX
-      // BB2:
-      //   ..
-      //   ret
-      //
-      // In this case, we could actually be moving the return block *into* a
-      // loop!
-      if (DoTransform && !MBB->succ_empty() &&
-          (!PriorTBB->canFallThrough() || PriorTBB->empty()))
-        DoTransform = false;
-
-
       if (DoTransform) {
         // Reverse the branch so we will fall through on the previous true cond.
         SmallVector<MachineOperand, 4> NewPriorCond(PriorCond);