diff options
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index e2e40f76d2..9cb899cb37 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -349,7 +349,8 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) { // If all of the indices are zero, the result points to the operand without // applying the type. - if (AllZeros) { + if (AllZeros || (!Value.isNull() && + Value.getNode()->isNodeCompletelyFolded())) { setDestTo(GEP, Value); return; } |