1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Fix handling of inttoptr and ptrtoint when unhandled operands are present.

llvm-svn: 55400
This commit is contained in:
Owen Anderson 2008-08-27 00:35:37 +00:00
parent c5d2fe6354
commit a0b7e0ab93

View File

@ -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;