This instruction:
authorChris Lattner <sabre@nondot.org>
Thu, 24 Feb 2005 19:55:31 +0000 (19:55 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 24 Feb 2005 19:55:31 +0000 (19:55 +0000)
  X = gep null, ...

Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20316 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Local.cpp

index 948bf3fc5da5a0b62a50df3fdd7e1845de2c7a71..642de036975f2d74b7b9bc4f0045eea40684a1ba 100644 (file)
@@ -318,7 +318,8 @@ void GraphBuilder::visitPHINode(PHINode &PN) {
 
 void GraphBuilder::visitGetElementPtrInst(User &GEP) {
   DSNodeHandle Value = getValueDest(*GEP.getOperand(0));
-  if (Value.isNull()) return;
+  if (Value.isNull())
+    Value = createNode();
 
   // As a special case, if all of the index operands of GEP are constant zeros,
   // handle this just like we handle casts (ie, don't do much).