summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5bd948b4d758ecb54b4b93f11127154e0f75077a (patch)
treee7e23ff4bb2d6f31929dedcf6c14bee28dc8dd29 /llvm/lib/Analysis/DataStructure/Local.cpp
parentbed9657ff65d4fdc99111b4f29b672ae472575a8 (diff)
downloadbcm5719-llvm-5bd948b4d758ecb54b4b93f11127154e0f75077a.tar.gz
bcm5719-llvm-5bd948b4d758ecb54b4b93f11127154e0f75077a.zip
another fastpath
llvm-svn: 20674
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Local.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp
index e2e40f76d2a..9cb899cb374 100644
--- a/llvm/lib/Analysis/DataStructure/Local.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud