mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
CopyToReg source operand can be a register as well. e.g. Copy from GlobalBaseReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ddbc606e94
commit
489a87ca09
@ -457,7 +457,11 @@ void ScheduleDAG::EmitNode(SDNode *Node,
|
||||
case ISD::TokenFactor:
|
||||
break;
|
||||
case ISD::CopyToReg: {
|
||||
unsigned InReg = getVR(Node->getOperand(2), VRBaseMap);
|
||||
unsigned InReg;
|
||||
if (RegisterSDNode *R = dyn_cast<RegisterSDNode>(Node->getOperand(2)))
|
||||
InReg = R->getReg();
|
||||
else
|
||||
InReg = getVR(Node->getOperand(2), VRBaseMap);
|
||||
unsigned DestReg = cast<RegisterSDNode>(Node->getOperand(1))->getReg();
|
||||
if (InReg != DestReg) // Coalesced away the copy?
|
||||
MRI->copyRegToReg(*BB, BB->end(), DestReg, InReg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user