cycle counter fix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth 2005-12-02 04:56:24 +00:00
parent 865874c88a
commit 49c709f891

View File

@ -1193,6 +1193,12 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain
if (Tmp1 != Node->getOperand(0)) if (Tmp1 != Node->getOperand(0))
Result = DAG.getNode(ISD::READCYCLECOUNTER, MVT::i64, Tmp1); Result = DAG.getNode(ISD::READCYCLECOUNTER, MVT::i64, Tmp1);
// Since rdcc produce two values, make sure to remember that we legalized
// both of them.
AddLegalizedOperand(SDOperand(Node, 0), Result);
AddLegalizedOperand(SDOperand(Node, 1), Result.getValue(1));
return Result.getValue(Op.ResNo);
break; break;
case ISD::TRUNCSTORE: case ISD::TRUNCSTORE: