summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-20 00:35:17 +0000
committerDan Gohman <gohman@apple.com>2008-08-20 00:35:17 +0000
commitf6884373c278f6b2306d55bd7b556accb3dcf8f5 (patch)
tree2a44a551605fc0f5f9de05cf7111326e4c6027ba /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parent71573d05f9d19b498c00a060667edb0dbab66737 (diff)
downloadbcm5719-llvm-f6884373c278f6b2306d55bd7b556accb3dcf8f5.tar.gz
bcm5719-llvm-f6884373c278f6b2306d55bd7b556accb3dcf8f5.zip
Fix FastISel to recognize unhandled operands, such as constants
that aren't available as virtual registers (for now). llvm-svn: 55026
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 996cea0155c..e56747a89c1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -25,6 +25,10 @@ bool FastISel::SelectBinaryOp(Instruction *I, ISD::NodeType ISDOpcode,
DenseMap<const Value*, unsigned> &ValueMap) {
unsigned Op0 = ValueMap[I->getOperand(0)];
unsigned Op1 = ValueMap[I->getOperand(1)];
+ if (Op0 == 0 || Op1 == 0)
+ // Unhandled operand. Halt "fast" selection and bail.
+ return false;
+
MVT VT = MVT::getMVT(I->getType(), /*HandleUnknown=*/true);
if (VT == MVT::Other || !VT.isSimple())
// Unhandled type. Halt "fast" selection and bail.
OpenPOWER on IntegriCloud