mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -265,6 +265,9 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
|
||||
MIB.addReg(VRBase, RegState::Define);
|
||||
}
|
||||
|
||||
// If this def corresponds to a result of the SDNode insert the VRBase into
|
||||
// the lookup map.
|
||||
if (i < NumResults) {
|
||||
SDValue Op(Node, i);
|
||||
if (IsClone)
|
||||
VRBaseMap.erase(Op);
|
||||
@@ -272,6 +275,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
|
||||
(void)isNew; // Silence compiler warning.
|
||||
assert(isNew && "Node emitted out of order - early");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// getVR - Return the virtual register corresponding to the specified result
|
||||
|
Reference in New Issue
Block a user