[llvm-commits] [llvm] r98694 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp

Bob Wilson bob.wilson at apple.com
Tue Mar 16 16:40:32 PDT 2010


Author: bwilson
Date: Tue Mar 16 18:40:32 2010
New Revision: 98694

URL: http://llvm.org/viewvc/llvm-project?rev=98694&view=rev
Log:
Remove a check that can no longer be true, after r84803.

Modified:
    llvm/trunk/lib/CodeGen/BranchFolding.cpp

Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=98694&r1=98693&r2=98694&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Tue Mar 16 18:40:32 2010
@@ -1143,22 +1143,6 @@
           !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);





More information about the llvm-commits mailing list