summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-24 19:55:31 +0000
committerChris Lattner <sabre@nondot.org>2005-02-24 19:55:31 +0000
commit753b113cdf94c5f1abaa3b9c329a7fd18cd2fac9 (patch)
tree6100469ce85faab241bbd6234efbbb005110c698
parentc06828350b059e5f9de3c87b0cc7b72bdbe39ea7 (diff)
downloadllvm-753b113cdf94c5f1abaa3b9c329a7fd18cd2fac9.tar.gz
llvm-753b113cdf94c5f1abaa3b9c329a7fd18cd2fac9.tar.bz2
llvm-753b113cdf94c5f1abaa3b9c329a7fd18cd2fac9.tar.xz
This instruction:
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
-rw-r--r--lib/Analysis/DataStructure/Local.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 948bf3fc5d..642de03697 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -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).