diff options
author | Owen Anderson <resistor@mac.com> | 2008-08-27 00:35:37 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-08-27 00:35:37 +0000 |
commit | 54aff7bb235f394830e5468dcd9b6c649312813c (patch) | |
tree | c4125d32f3a15b4bc08206cde3605be3a2bb8352 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 140549256fe5bc73827dc0a9e0bd8c0bfba16bd7 (diff) | |
download | bcm5719-llvm-54aff7bb235f394830e5468dcd9b6c649312813c.tar.gz bcm5719-llvm-54aff7bb235f394830e5468dcd9b6c649312813c.zip |
Fix handling of inttoptr and ptrtoint when unhandled operands are present.
llvm-svn: 55400
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 64843f8b558..a956f0190b4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -393,8 +393,12 @@ FastISel::SelectInstructions(BasicBlock::iterator Begin, MVT SrcVT = TLI.getValueType(I->getOperand(0)->getType()); MVT DstVT = TLI.getValueType(I->getType()); if (SrcVT.getSimpleVT() == DstVT.getSimpleVT()) { - ValueMap[I] = ValueMap[I->getOperand(0)]; - break; + if (ValueMap[I->getOperand(0)]) { + ValueMap[I] = ValueMap[I->getOperand(0)]; + break; + } else + // Unhandled operand + return I; } else if (DstVT.bitsGT(SrcVT)) { if (!isa<ConstantInt>(I->getOperand(0))) { if (!SelectCast(I, ISD::ZERO_EXTEND, ValueMap)) return I; |