diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-08-17 10:06:08 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-08-17 10:06:08 +0000 |
commit | adc4e9c4143e087076fba62ce7507991cbd242e2 (patch) | |
tree | 7b503e7f2be108d1a5572d58176e99addb123de4 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp | |
parent | f0c4ba633041cb73fecae023d1b7a9ca898dd46e (diff) | |
download | bcm5719-llvm-adc4e9c4143e087076fba62ce7507991cbd242e2.tar.gz bcm5719-llvm-adc4e9c4143e087076fba62ce7507991cbd242e2.zip |
[GMR] isNonEscapingGlobalNoAlias() should look through Bitcasts/GEPs when looking at loads.
This fixes yet another case from PR24288.
Differential Revision: http://reviews.llvm.org/D12064
llvm-svn: 245207
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index 2798888ce7d..5482a13d1e7 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -651,7 +651,7 @@ bool GlobalsModRef::isNonEscapingGlobalNoAlias(const GlobalValue *GV, if (auto *LI = dyn_cast<LoadInst>(Input)) { // A pointer loaded from a global would have been captured, and we know // that the global is non-escaping, so no alias. - if (isa<GlobalValue>(LI->getPointerOperand())) + if (isa<GlobalValue>(GetUnderlyingObject(LI->getPointerOperand(), *DL))) continue; // Otherwise, a load could come from anywhere, so bail. |