mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
CopyFromReg produces two values. Make sure that we remember that both are
legalized, and actually return the correct result when we legalize the chain first. llvm-svn: 19866
This commit is contained in:
parent
9ed700733d
commit
4134789c8f
@ -206,7 +206,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
if (Tmp1 != Node->getOperand(0))
|
||||
Result = DAG.getCopyFromReg(cast<RegSDNode>(Node)->getReg(),
|
||||
Node->getValueType(0), Tmp1);
|
||||
break;
|
||||
else
|
||||
Result = Op.getValue(0);
|
||||
|
||||
// Since CopyFromReg produces two values, make sure to remember that we
|
||||
// legalized both of them.
|
||||
AddLegalizedOperand(Op.getValue(0), Result);
|
||||
AddLegalizedOperand(Op.getValue(1), Result.getValue(1));
|
||||
return Result.getValue(Op.ResNo);
|
||||
case ISD::ImplicitDef:
|
||||
Tmp1 = LegalizeOp(Node->getOperand(0));
|
||||
if (Tmp1 != Node->getOperand(0))
|
||||
|
Loading…
Reference in New Issue
Block a user