Remove dead PPC LR spilling code
[oota-llvm.git] / lib / Target / PowerPC / PPCCTRLoops.cpp
index 5b20f81a3e080c617a96c3afd7f2bd87154f3cb5..81a54d7015b0fd4b0dbd71b2f8b31ce25caf03bb 100644 (file)
@@ -685,7 +685,7 @@ bool PPCCTRLoops::convertToCTRLoop(MachineLoop *L) {
     const TargetRegisterClass *SrcRC =
       MF->getRegInfo().getRegClass(TripCount->getReg());
     CountReg = MF->getRegInfo().createVirtualRegister(RC);
-    unsigned CopyOp = (isPPC64 && SrcRC == GPRC) ?
+    unsigned CopyOp = (isPPC64 && GPRC->hasSubClassEq(SrcRC)) ?
                         (unsigned) PPC::EXTSW_32_64 :
                         (unsigned) TargetOpcode::COPY;
     BuildMI(*Preheader, InsertPos, dl,