summaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index d08c2583b9f..5a2f921ebf4 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -280,7 +280,7 @@ void GlobalsModRef::AnalyzeSCC(std::vector<CallGraphNode *> &SCC) {
ModRefBehavior MRB =
AliasAnalysis::getModRefBehavior(Callee, CallSite());
if (MRB != DoesNotAccessMemory) {
- if (MRB == OnlyReadsMemory) {
+ if (MRB == OnlyReadsMemory && CalleeFR) {
// This reads memory, but we don't know what, just say that it
// reads all globals.
for (std::map<GlobalValue*, unsigned>::iterator