[llvm-commits] [llvm] r104051 - /llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp

Evan Cheng evan.cheng at apple.com
Tue May 18 13:07:47 PDT 2010


Author: evancheng
Date: Tue May 18 15:07:47 2010
New Revision: 104051

URL: http://llvm.org/viewvc/llvm-project?rev=104051&view=rev
Log:
Continuously refine the register class of REG_SEQUENCE def with all the source registers and sub-register indices.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp?rev=104051&r1=104050&r2=104051&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Tue May 18 15:07:47 2010
@@ -551,11 +551,12 @@
       const TargetRegisterClass *TRC = MRI->getRegClass(SubReg);
       const TargetRegisterClass *SRC =
         TRI->getMatchingSuperRegClass(RC, TRC, SubIdx);
-      //getSuperRegisterRegClass(TRC, SubIdx, Node->getValueType(0));
       if (!SRC)
         llvm_unreachable("Invalid subregister index in REG_SEQUENCE");
-      if (SRC != RC)
+      if (SRC != RC) {
         MRI->setRegClass(NewVReg, SRC);
+        RC = SRC;
+      }
     }
     AddOperand(MI, Op, i+1, &II, VRBaseMap, /*IsDebug=*/false,
                IsClone, IsCloned);





More information about the llvm-commits mailing list