aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-18 23:18:20 +0000
committerChris Lattner <sabre@nondot.org>2005-03-18 23:18:20 +0000
commit0c9707a190cfea2bd94777e561d7cc0af8342417 (patch)
tree4066a8392f7a56bd9bcf3ad82011797e68345270 /lib/Analysis/DataStructure/Local.cpp
parent67c2d18166080d74cee60857261cae2ada776a5d (diff)
another fastpath
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-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 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;
}