aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-08 20:58:38 +0000
committerDan Gohman <gohman@apple.com>2009-05-08 20:58:38 +0000
commitfb791608115b5193419549b02825ed4337fd3a37 (patch)
tree93877e4a0a4ff835adc6e21e7d38bbf683402443 /lib/Analysis/ScalarEvolution.cpp
parent871eb0ab23a5d47da71c5584fae7ab9f64a0a4f6 (diff)
Fix another bug in r71252. This code supports GetElementPtr
constant exprs as well as instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 4ddde5db5e..90c4f5758f 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/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<GetElementPtrInst>(U));
+ return createNodeForGEP(U);
case Instruction::PHI:
return createNodeForPHI(cast<PHINode>(U));