Reduce indentation and fix the count of how many PHIs we have inserted.
[oota-llvm.git] / lib / CodeGen / InlineSpiller.cpp
index 19ae333115c067c2ffda3ea4ef85e7a206090736..0273891d690b04ddf4ae92c185e8e24a234e9cd1 100644 (file)
@@ -180,11 +180,7 @@ Spiller *createInlineSpiller(MachineFunctionPass &pass,
 /// isFullCopyOf - If MI is a COPY to or from Reg, return the other register,
 /// otherwise return 0.
 static unsigned isFullCopyOf(const MachineInstr *MI, unsigned Reg) {
-  if (!MI->isCopy())
-    return 0;
-  if (MI->getOperand(0).getSubReg() != 0)
-    return 0;
-  if (MI->getOperand(1).getSubReg() != 0)
+  if (!MI->isFullCopy())
     return 0;
   if (MI->getOperand(0).getReg() == Reg)
       return MI->getOperand(1).getReg();