From cb7cfa495455ae871f54e93f394c9298b0ccd0db Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Wed, 22 Jun 2011 21:13:23 +0000 Subject: [PATCH] Revert r133607. This is causing failures in the Clang gccTestSuite. Specifically, gcc.c-torture/compile/pr21356.c. llvm-svn: 133646 --- llvm/lib/CodeGen/TailDuplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/CodeGen/TailDuplication.cpp b/llvm/lib/CodeGen/TailDuplication.cpp index 6e832d99ef92..d16369a4ca66 100644 --- a/llvm/lib/CodeGen/TailDuplication.cpp +++ b/llvm/lib/CodeGen/TailDuplication.cpp @@ -568,9 +568,9 @@ bool TailDuplicatePass::isSimpleBB(MachineBasicBlock *TailBB) { if (TailBB->succ_size() != 1) return false; - MachineBasicBlock::iterator I = TailBB->begin(); + MachineBasicBlock::iterator I = TailBB->getFirstNonPHI(); MachineBasicBlock::iterator E = TailBB->end(); - while (I != E && I->isDebugValue()) + while (I->isDebugValue() && I != E) ++I; if (I == E) return true; @@ -712,7 +712,7 @@ TailDuplicatePass::TailDuplicate(MachineBasicBlock *TailBB, MachineFunction &MF, DenseSet UsedByPhi; getRegsUsedByPHIs(*TailBB, &UsedByPhi); - if (isSimpleBB(TailBB)) + if (0 && isSimpleBB(TailBB)) return duplicateSimpleBB(TailBB, TDBBs, UsedByPhi, Copies); // Iterate through all the unique predecessors and tail-duplicate this