diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-12-02 04:56:24 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-12-02 04:56:24 +0000 |
commit | 73420b379585d67cd873549deff8658615b43ff2 (patch) | |
tree | e5ab53d2f939c6931526a83623bd71c6b9f1303b /llvm/lib/CodeGen | |
parent | 986cb40953bdac68dcfd765b57d5be5197e5e138 (diff) | |
download | bcm5719-llvm-73420b379585d67cd873549deff8658615b43ff2.tar.gz bcm5719-llvm-73420b379585d67cd873549deff8658615b43ff2.zip |
cycle counter fix
llvm-svn: 24573
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 0690c641db6..feaf890e950 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1193,6 +1193,12 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain if (Tmp1 != Node->getOperand(0)) 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; case ISD::TRUNCSTORE: |