Changes in directory llvm/lib/Target/X86:
X86InstrInfo.cpp updated: 1.88 -> 1.89 --- Log message: Handle blocks with 2 unconditional branches in AnalyzeBranch. --- Diffs of the changes: (+10 -0) X86InstrInfo.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.88 llvm/lib/Target/X86/X86InstrInfo.cpp:1.89 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.88 Fri Jun 8 16:59:56 2007 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Wed Jun 13 12:59:52 2007 @@ -427,6 +427,16 @@ return false; } + // If the block ends with two X86::JMPs, handle it. The second one is not + // executed, so remove it. + if (SecondLastInst->getOpcode() == X86::JMP && + LastInst->getOpcode() == X86::JMP) { + TBB = SecondLastInst->getOperand(0).getMachineBasicBlock(); + I = LastInst; + I->eraseFromParent(); + return false; + } + // Otherwise, can't handle this. return true; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits