forked from OSchip/llvm-project
Handle CopyToReg nodes with flag operands correctly
llvm-svn: 23144
This commit is contained in:
parent
7a59b1cf90
commit
04cb82278a
|
@ -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