summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorKalle Raiskila <kalle.raiskila@nokia.com>2010-05-11 11:00:02 +0000
committerKalle Raiskila <kalle.raiskila@nokia.com>2010-05-11 11:00:02 +0000
commit9dd3ef8d015999119d95cc4cca938d82b613882f (patch)
tree4c9ded17d0647e394d2e9bacf060a2bb032f1560 /llvm/lib
parentbe49fc5ea279d326023c3103c2eae3015c671628 (diff)
downloadbcm5719-llvm-9dd3ef8d015999119d95cc4cca938d82b613882f.tar.gz
bcm5719-llvm-9dd3ef8d015999119d95cc4cca938d82b613882f.zip
Make SPU backend not assert on jump tables.
llvm-svn: 103466
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/CellSPU/SPUInstrInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp b/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp
index 066c5b06140..4c53c988d33 100644
--- a/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp
+++ b/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp
@@ -467,6 +467,9 @@ SPUInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
// If there is only one terminator instruction, process it.
if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) {
if (isUncondBranch(LastInst)) {
+ // Check for jump tables
+ if (!LastInst->getOperand(0).isMBB())
+ return true;
TBB = LastInst->getOperand(0).getMBB();
return false;
} else if (isCondBranch(LastInst)) {
OpenPOWER on IntegriCloud