summaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-02-11 21:12:38 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-02-11 21:12:38 +0000
commit69bc4ddf101663a0b4f23dec25a6f2a2a76699f6 (patch)
treee6efe7b47022d1f7fee2dc1f87dda9d4948c503b /lib/Target
parent1e6240a85ddafbd35af931958d38b79b6683f23b (diff)
downloadllvm-69bc4ddf101663a0b4f23dec25a6f2a2a76699f6.tar.gz
llvm-69bc4ddf101663a0b4f23dec25a6f2a2a76699f6.tar.bz2
llvm-69bc4ddf101663a0b4f23dec25a6f2a2a76699f6.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/R600/SILowerControlFlow.cpp6
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) {