bah, must generate all results
authorAndrew Lenharth <andrewl@lenharth.org>
Fri, 2 Dec 2005 06:08:08 +0000 (06:08 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Fri, 2 Dec 2005 06:08:08 +0000 (06:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24574 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index feaf890e9502e3bf29ee9b2c7fba02fd43f032e9..c02fc9ac69ef446ae45193b349f6bcf1f4ab3215 100644 (file)
@@ -1191,8 +1191,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
     break;
   case ISD::READCYCLECOUNTER:
     Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain
-    if (Tmp1 != Node->getOperand(0))
-      Result = DAG.getNode(ISD::READCYCLECOUNTER, MVT::i64, Tmp1);
+    if (Tmp1 != Node->getOperand(0)) {
+      std::vector<MVT::ValueType> rtypes;
+      std::vector<SDOperand> rvals;
+      rtypes.push_back(MVT::i64);
+      rtypes.push_back(MVT::Other);
+      rvals.push_back(Tmp1);
+      Result = DAG.getNode(ISD::READCYCLECOUNTER, rtypes, rvals);
+    }
 
     // Since rdcc produce two values, make sure to remember that we legalized
     // both of them.