Fix an error from r71252.
authorDan Gohman <gohman@apple.com>
Fri, 8 May 2009 20:36:47 +0000 (20:36 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 8 May 2009 20:36:47 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71255 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 81bf7e8dd9e56361fe4fd8a728376db384e89d9a..c43aad39875ec2a97e818db7b5322c849b33e2a7 100644 (file)
@@ -1869,11 +1869,11 @@ SCEVHandle ScalarEvolution::createNodeForPHI(PHINode *PN) {
 SCEVHandle ScalarEvolution::createNodeForGEP(GetElementPtrInst *GEP) {
 
   const Type *IntPtrTy = TD->getIntPtrType();
-  Value *Base = U->getOperand(0);
+  Value *Base = GEP->getOperand(0);
   SCEVHandle TotalOffset = getIntegerSCEV(0, IntPtrTy);
-  gep_type_iterator GTI = gep_type_begin(U);
-  for (GetElementPtrInst::op_iterator I = next(U->op_begin()),
-                                      E = U->op_end();
+  gep_type_iterator GTI = gep_type_begin(GEP);
+  for (GetElementPtrInst::op_iterator I = next(GEP->op_begin()),
+                                      E = GEP->op_end();
        I != E; ++I) {
     Value *Index = *I;
     // Compute the (potentially symbolic) offset in bytes for this index.