Instcombine PHI's of the form %PN = phi PN, X into X and
[oota-llvm.git] / lib / Transforms / Scalar / LICM.cpp
index 8bcb227e74b14c542b1e78dcb966fda4b638ad38..1cb899bf6e2bc41910e5fbfd2eca0bcd05275058 100644 (file)
@@ -88,8 +88,9 @@ namespace {
       if (isLoopInvariant(I.getOperand(0)) && isLoopInvariant(I.getOperand(1)))
         hoist(I);
     }
-    void visitCastInst(CastInst &I) {
-      if (isLoopInvariant(I.getOperand(0))) hoist((Instruction&)I);
+    void visitCastInst(CastInst &CI) {
+      Instruction &I = (Instruction&)CI;
+      if (isLoopInvariant(I.getOperand(0))) hoist(I);
     }
     void visitShiftInst(ShiftInst &I) { visitBinaryOperator((Instruction&)I); }