mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-18 10:31:57 +00:00
Handle CopyToReg nodes with flag operands correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31ce12f4f5
commit
55334fc45c
@ -205,8 +205,13 @@ unsigned SimpleSched::Emit(SDOperand Op) {
|
||||
Emit(Op.getOperand(i));
|
||||
break;
|
||||
case ISD::CopyToReg: {
|
||||
Emit(Op.getOperand(0)); // Emit the chain.
|
||||
SDOperand ChainOp;
|
||||
if (Op.getNumOperands() == 4)
|
||||
ChainOp = Op.getOperand(3);
|
||||
if (Op.getOperand(0).Val != ChainOp.Val)
|
||||
Emit(Op.getOperand(0)); // Emit the chain.
|
||||
unsigned Val = Emit(Op.getOperand(2));
|
||||
if (ChainOp.Val) Emit(ChainOp);
|
||||
MRI.copyRegToReg(*BB, BB->end(),
|
||||
cast<RegisterSDNode>(Op.getOperand(1))->getReg(), Val,
|
||||
RegMap->getRegClass(Val));
|
||||
|
Loading…
Reference in New Issue
Block a user