mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-31 15:53:42 +00:00
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
This commit is contained in:
parent
9d5b416240
commit
96c5ea878c
@ -393,8 +393,12 @@ FastISel::SelectInstructions(BasicBlock::iterator Begin,
|
|||||||
MVT SrcVT = TLI.getValueType(I->getOperand(0)->getType());
|
MVT SrcVT = TLI.getValueType(I->getOperand(0)->getType());
|
||||||
MVT DstVT = TLI.getValueType(I->getType());
|
MVT DstVT = TLI.getValueType(I->getType());
|
||||||
if (SrcVT.getSimpleVT() == DstVT.getSimpleVT()) {
|
if (SrcVT.getSimpleVT() == DstVT.getSimpleVT()) {
|
||||||
ValueMap[I] = ValueMap[I->getOperand(0)];
|
if (ValueMap[I->getOperand(0)]) {
|
||||||
break;
|
ValueMap[I] = ValueMap[I->getOperand(0)];
|
||||||
|
break;
|
||||||
|
} else
|
||||||
|
// Unhandled operand
|
||||||
|
return I;
|
||||||
} else if (DstVT.bitsGT(SrcVT)) {
|
} else if (DstVT.bitsGT(SrcVT)) {
|
||||||
if (!isa<ConstantInt>(I->getOperand(0))) {
|
if (!isa<ConstantInt>(I->getOperand(0))) {
|
||||||
if (!SelectCast(I, ISD::ZERO_EXTEND, ValueMap)) return I;
|
if (!SelectCast(I, ISD::ZERO_EXTEND, ValueMap)) return I;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user