Fix bug introduced in last checkin due to CastInst not being visible
authorChris Lattner <sabre@nondot.org>
Wed, 14 Aug 2002 18:22:19 +0000 (18:22 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Aug 2002 18:22:19 +0000 (18:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3327 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GCSE.cpp
lib/Transforms/Scalar/LICM.cpp

index a99a502348ef72fdce9dee19f64757e1e6f8630e..2f1be3b24675591212cca2a78d1cc4d4892d0aaf 100644 (file)
@@ -253,7 +253,8 @@ void GCSE::CommonSubExpressionFound(Instruction *I, Instruction *Other) {
 //
 //===----------------------------------------------------------------------===//
 
-bool GCSE::visitCastInst(CastInst &I) {
+bool GCSE::visitCastInst(CastInst &CI) {
+  Instruction &I = (Instruction&)CI;
   Value *Op = I.getOperand(0);
   Function *F = I.getParent()->getParent();
   
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); }