diff options
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/R600/SILowerControlFlow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/R600/SILowerControlFlow.cpp b/lib/Target/R600/SILowerControlFlow.cpp index 4b0952f721..f6f9016e7e 100644 --- a/lib/Target/R600/SILowerControlFlow.cpp +++ b/lib/Target/R600/SILowerControlFlow.cpp @@ -283,8 +283,10 @@ void SILowerControlFlowPass::EndCf(MachineInstr &MI) { } void SILowerControlFlowPass::Branch(MachineInstr &MI) { - assert(MI.getOperand(0).getMBB() == MI.getParent()->getNextNode()); - MI.eraseFromParent(); + if (MI.getOperand(0).getMBB() == MI.getParent()->getNextNode()) + MI.eraseFromParent(); + + // If these aren't equal, this is probably an infinite loop. } void SILowerControlFlowPass::Kill(MachineInstr &MI) { |