Fix Bug: BasicAA/2003-05-21-GEP-Problem.ll
authorChris Lattner <sabre@nondot.org>
Wed, 21 May 2003 20:23:26 +0000 (20:23 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 May 2003 20:23:26 +0000 (20:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6270 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicAliasAnalysis.cpp

index 4911c0d69373ae8832f91b48670a22889bc8d2a8..cdf6f6dc44e84e7bdbc6cdc859b07a5566e6374e 100644 (file)
@@ -290,7 +290,7 @@ BasicAliasAnalysis::CheckGEPInstructions(GetElementPtrInst *GEP1, unsigned G1S,
       if (isa<Constant>(Op2))
         Indices2.push_back((Value*)Op2);
       else // Conservatively assume the minimum value for this index
-        Indices2.push_back(Constant::getNullValue(Op1->getType()));
+        Indices2.push_back(Constant::getNullValue(Op2->getType()));
     }
   }