mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
[FastISel][AArch64] Move unconditional branch handling into 'SelectBranch'. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217054 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b9053f6cbc
commit
1892eabdef
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user