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 | 32e6eeefeacc64395e8a616e876d25a8a4dc1060 (patch) | |
tree | f6feacf1f40c8079801747d57dae357f66489399 /lib | |
parent | d5d9a90ab4c97946e242ff3072cbff591e8ddb68 (diff) | |
download | external_llvm-32e6eeefeacc64395e8a616e876d25a8a4dc1060.zip external_llvm-32e6eeefeacc64395e8a616e876d25a8a4dc1060.tar.gz external_llvm-32e6eeefeacc64395e8a616e876d25a8a4dc1060.tar.bz2 |
Fix handling of inttoptr and ptrtoint when unhandled operands are present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 64843f8..a956f01 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/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; |