CodeGen: Continue removing ilist iterator implicit conversions
[oota-llvm.git] / lib / CodeGen / MachineLICM.cpp
index 3ae5aa554d65fe03241d1b7f8b49bd69277c9796..fa59b0c6aca24c4203599d0d4fb80142e343ce00 100644 (file)
@@ -794,8 +794,8 @@ void MachineLICM::SinkIntoLoop() {
        I != Preheader->instr_end(); ++I) {
     // We need to ensure that we can safely move this instruction into the loop.
     // As such, it must not have side-effects, e.g. such as a call has.  
-    if (IsLoopInvariantInst(*I) && !HasLoopPHIUse(I))
-      Candidates.push_back(I);
+    if (IsLoopInvariantInst(*I) && !HasLoopPHIUse(&*I))
+      Candidates.push_back(&*I);
   }
 
   for (MachineInstr *I : Candidates) {