Changes in directory llvm/lib/Target/PowerPC:
PPCInstrInfo.cpp updated: 1.24 -> 1.25 --- Log message: add support for inserting an uncond branch --- Diffs of the changes: (+8 -2) PPCInstrInfo.cpp | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.24 llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.25 --- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.24 Fri Oct 13 16:21:17 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Tue Oct 17 13:06:55 2006 @@ -238,8 +238,14 @@ void PPCInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const std::vector<MachineOperand> &Cond) const { - // Fall through? - if (TBB == 0 && FBB == 0) return; + // Shouldn't be a fall through. + assert(TBB && "InsertBranch must not be told to insert a fallthrough"); + + // Unconditional branch? + if (FBB == 0) { + BuildMI(&MBB, PPC::B, 1).addMBB(TBB); + return; + } assert(Cond.size() == 2 && "PPC branch conditions have two components!"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits