mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[SDAG] Don't insert the VRBase into a mapping from SDValues when the def
doesn't actually correspond to an SDValue at all. Fixes most of the remaining asserts on out-of-range SDValue result numbers. llvm-svn: 213930
This commit is contained in:
parent
977e6a229d
commit
4301a01fcd
@ -265,12 +265,16 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
|
|||||||
MIB.addReg(VRBase, RegState::Define);
|
MIB.addReg(VRBase, RegState::Define);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue Op(Node, i);
|
// If this def corresponds to a result of the SDNode insert the VRBase into
|
||||||
if (IsClone)
|
// the lookup map.
|
||||||
VRBaseMap.erase(Op);
|
if (i < NumResults) {
|
||||||
bool isNew = VRBaseMap.insert(std::make_pair(Op, VRBase)).second;
|
SDValue Op(Node, i);
|
||||||
(void)isNew; // Silence compiler warning.
|
if (IsClone)
|
||||||
assert(isNew && "Node emitted out of order - early");
|
VRBaseMap.erase(Op);
|
||||||
|
bool isNew = VRBaseMap.insert(std::make_pair(Op, VRBase)).second;
|
||||||
|
(void)isNew; // Silence compiler warning.
|
||||||
|
assert(isNew && "Node emitted out of order - early");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user