mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-16 10:18:09 +00:00
Handle CopyToReg nodes with flag operands correctly
llvm-svn: 23144
This commit is contained in:
parent
0e6343b2e4
commit
56051a0f92
@ -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…
x
Reference in New Issue
Block a user