From 5514bbef465c4e10c9c0be9168e02d5cc5434e9f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 8 Jun 2007 21:59:56 +0000 Subject: Add a utility routine to check for unpredicated terminator instruction. llvm-svn: 37528 --- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/PowerPC') diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp index 7659a570800..1ec9e601387 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -180,14 +180,14 @@ bool PPCInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, std::vector &Cond) const { // If the block has no terminators, it just falls into the block after it. MachineBasicBlock::iterator I = MBB.end(); - if (I == MBB.begin() || !isTerminatorInstr((--I)->getOpcode())) + if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) return false; // Get the last instruction in the block. MachineInstr *LastInst = I; // If there is only one terminator instruction, process it. - if (I == MBB.begin() || !isTerminatorInstr((--I)->getOpcode())) { + if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) { if (LastInst->getOpcode() == PPC::B) { TBB = LastInst->getOperand(0).getMachineBasicBlock(); return false; @@ -207,7 +207,7 @@ bool PPCInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, // If there are three terminators, we don't know what sort of block this is. if (SecondLastInst && I != MBB.begin() && - isTerminatorInstr((--I)->getOpcode())) + isUnpredicatedTerminator(--I)) return true; // If the block ends with PPC::B and PPC:BCC, handle it. -- cgit v1.2.3