diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index c9a80b74a2d1..37b1dc0ddd81 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -286,7 +286,7 @@ namespace llvm { /// createNodeForGEP - Provide the special handling we need to analyze GEP /// SCEVs. - SCEVHandle createNodeForGEP(GetElementPtrInst *GEP); + SCEVHandle createNodeForGEP(User *GEP); /// ReplaceSymbolicValueWithConcrete - This looks up the computed SCEV value /// for the specified instruction and replaces any references to the diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 4ddde5db5ed1..90c4f5758fe4 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1866,7 +1866,7 @@ SCEVHandle ScalarEvolution::createNodeForPHI(PHINode *PN) { /// createNodeForGEP - Expand GEP instructions into add and multiply /// operations. This allows them to be analyzed by regular SCEV code. /// -SCEVHandle ScalarEvolution::createNodeForGEP(GetElementPtrInst *GEP) { +SCEVHandle ScalarEvolution::createNodeForGEP(User *GEP) { const Type *IntPtrTy = TD->getIntPtrType(); Value *Base = GEP->getOperand(0); @@ -2113,7 +2113,7 @@ SCEVHandle ScalarEvolution::createSCEV(Value *V) { case Instruction::GetElementPtr: if (!TD) break; // Without TD we can't analyze pointers. - return createNodeForGEP(cast(U)); + return createNodeForGEP(U); case Instruction::PHI: return createNodeForPHI(cast(U));