diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-02-11 21:12:38 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-02-11 21:12:38 +0000 |
commit | 71b71d25eb137a99b213b198e90a831dc3ed8b01 (patch) | |
tree | bd15f30d8b54e4ab05d6ec73d005163cbb981578 /llvm/lib/Target/R600/SILowerControlFlow.cpp | |
parent | 94fc18d0400d0e779226c4ee065032f0e3b25c15 (diff) | |
download | llvm-71b71d25eb137a99b213b198e90a831dc3ed8b01.zip llvm-71b71d25eb137a99b213b198e90a831dc3ed8b01.tar.gz llvm-71b71d25eb137a99b213b198e90a831dc3ed8b01.tar.bz2 |
R600/SI: Fix assertion on infinite loops.
This isn't the most useful case to fix in the real world,
but bugpoint runs into this.
llvm-svn: 201177
Diffstat (limited to 'llvm/lib/Target/R600/SILowerControlFlow.cpp')
-rw-r--r-- | llvm/lib/Target/R600/SILowerControlFlow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/R600/SILowerControlFlow.cpp b/llvm/lib/Target/R600/SILowerControlFlow.cpp index 4b0952f..f6f9016 100644 --- a/llvm/lib/Target/R600/SILowerControlFlow.cpp +++ b/llvm/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) { |