Fix bug introduced in last checkin due to CastInst not being visible
llvm-svn: 3327
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 8bcb227..1cb899b 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -88,8 +88,9 @@
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); }