AArch64: Assert on analyzeBranch failing

llvm-svn: 278366
This commit is contained in:
Matt Arsenault 2016-08-11 17:22:59 +00:00
parent ee900b62ef
commit 76837df6ff
1 changed files with 4 additions and 2 deletions

View File

@ -424,9 +424,11 @@ bool AArch64BranchRelaxation::fixupConditionalBranch(MachineInstr &MI) {
if (NeedSplit) {
// Analyze the branch so we know how to update the successor lists.
MachineBasicBlock *TBB, *FBB;
MachineBasicBlock *TBB = nullptr, *FBB = nullptr;
SmallVector<MachineOperand, 2> Cond;
TII->analyzeBranch(*MBB, TBB, FBB, Cond, false);
bool Fail = TII->analyzeBranch(*MBB, TBB, FBB, Cond, false);
assert(!Fail && "branches to relax should be analyzable");
(void)Fail;
MachineBasicBlock *NewBB = splitBlockBeforeInstr(MI);
// No need for the branch to the next block. We're adding an unconditional