[llvm-commits] [llvm] r96728 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h

Chris Lattner sabre at nondot.org
Sat Feb 20 22:58:27 PST 2010


Author: lattner
Date: Sun Feb 21 00:58:27 2010
New Revision: 96728

URL: http://llvm.org/viewvc/llvm-project?rev=96728&view=rev
Log:
fix two bugs in OPC_EmitRegister, which makes ppc happier.

Modified:
    llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h

Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=96728&r1=96727&r2=96728&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Sun Feb 21 00:58:27 2010
@@ -525,11 +525,10 @@
     }
         
     case OPC_EmitRegister: {
-      unsigned RegNo = MatcherTable[MatcherIndex++];
       MVT::SimpleValueType VT =
-      (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
-      SDValue Reg = CurDAG->getRegister(RegNo, VT);
-      RecordedNodes.push_back(N);
+        (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
+      unsigned RegNo = MatcherTable[MatcherIndex++];
+      RecordedNodes.push_back(CurDAG->getRegister(RegNo, VT));
       continue;
     }
         
@@ -640,6 +639,8 @@
       SmallVector<EVT, 4> VTs;
       for (unsigned i = 0; i != NumVTs; ++i)
         VTs.push_back((MVT::SimpleValueType)MatcherTable[MatcherIndex++]);
+      
+      // FIXME: Use faster version for the common 'one VT' case?
       SDVTList VTList = CurDAG->getVTList(VTs.data(), VTs.size());
 
       // Get the operand list.





More information about the llvm-commits mailing list