summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-19 20:43:22 +0000
committerDan Gohman <gohman@apple.com>2008-08-19 20:43:22 +0000
commitc55fdcc9358d99bbc66bc6394a8490a7188fd74d (patch)
tree75d406235754105d5a639a121cac7b2a0e065a8e /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parentaa13b6f71b9e4be0483625fb3f36317dfedf2c4e (diff)
downloadbcm5719-llvm-c55fdcc9358d99bbc66bc6394a8490a7188fd74d.tar.gz
bcm5719-llvm-c55fdcc9358d99bbc66bc6394a8490a7188fd74d.zip
Handle the case where target-specific fastisel code doesn't have
a desired opcode. llvm-svn: 55005
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index f4d453966b8..62fac06ceb8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -33,6 +33,11 @@ FastISel::SelectInstructions(BasicBlock::iterator Begin, BasicBlock::iterator En
return I;
}
unsigned ResultReg = FastEmit_rr(VT.getSimpleVT(), ISD::ADD, Op0, Op1);
+ if (ResultReg == 0) {
+ // Target-specific code wasn't able to find a machine opcode for
+ // the given ISD opcode and type. Halt "fast" selection and bail.
+ return I;
+ }
ValueMap[I] = ResultReg;
break;
}
OpenPOWER on IntegriCloud