aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-12-02 04:56:24 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-12-02 04:56:24 +0000
commit49c709f891a3e49db58b56ca94eafa98cbb12c4d (patch)
treef55698299d536c7635a19a12b8b75c63269a7e4e /lib/CodeGen
parent865874c88a387c4c1614db61083d2c2504dc1cdf (diff)
cycle counter fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 0690c641db..feaf890e95 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/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: