1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[FastISel][AArch64] Move unconditional branch handling into 'SelectBranch'. NFC.

llvm-svn: 217054
This commit is contained in:
Juergen Ributzka 2014-09-03 17:58:10 +00:00
parent cc1b741a66
commit addc44901e

View File

@ -1524,6 +1524,12 @@ static AArch64CC::CondCode getCompareCC(CmpInst::Predicate Pred) {
bool AArch64FastISel::SelectBranch(const Instruction *I) {
const BranchInst *BI = cast<BranchInst>(I);
if (BI->isUnconditional()) {
MachineBasicBlock *MSucc = FuncInfo.MBBMap[BI->getSuccessor(0)];
FastEmitBranch(MSucc, BI->getDebugLoc());
return true;
}
MachineBasicBlock *TBB = FuncInfo.MBBMap[BI->getSuccessor(0)];
MachineBasicBlock *FBB = FuncInfo.MBBMap[BI->getSuccessor(1)];
@ -3471,16 +3477,8 @@ bool AArch64FastISel::TargetSelectInstruction(const Instruction *I) {
return SelectBinaryOp(I, ISD::XOR);
case Instruction::GetElementPtr:
return SelectGetElementPtr(I);
case Instruction::Br: {
const BranchInst *BI = cast<BranchInst>(I);
if (BI->isUnconditional()) {
const BasicBlock *LLVMSucc = BI->getSuccessor(0);
MachineBasicBlock *MSucc = FuncInfo.MBBMap[LLVMSucc];
FastEmitBranch(MSucc, BI->getDebugLoc());
return true;
}
case Instruction::Br:
return SelectBranch(I);
}
case Instruction::IndirectBr:
return SelectIndirectBr(I);
case Instruction::Unreachable: