[llvm-commits] [llvm] r55400 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Owen Anderson
resistor at mac.com
Tue Aug 26 17:35:37 PDT 2008
Author: resistor
Date: Tue Aug 26 19:35:37 2008
New Revision: 55400
URL: http://llvm.org/viewvc/llvm-project?rev=55400&view=rev
Log:
Fix handling of inttoptr and ptrtoint when unhandled operands are present.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55400&r1=55399&r2=55400&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Aug 26 19:35:37 2008
@@ -393,8 +393,12 @@
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;
More information about the llvm-commits
mailing list