Fix bug introduced in last checkin due to CastInst not being visible

llvm-svn: 3327
This commit is contained in:
Chris Lattner 2002-08-14 18:22:19 +00:00
parent d909e03b2e
commit 760f32d641
2 changed files with 5 additions and 3 deletions

View 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();

View 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); }