aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm')
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
index 309938accdf4..daf6a0e65d54 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
@@ -170,8 +170,9 @@ void PPCMergeStringPool::collectCandidateConstants(Module &M) {
LLVM_DEBUG(dbgs() << "hasInitializer() " << Global.hasInitializer()
<< "\n");
- // We can only pool constants.
- if (!Global.isConstant() || !Global.hasInitializer())
+ // We can only pool non-thread-local constants.
+ if (!Global.isConstant() || !Global.hasInitializer() ||
+ Global.isThreadLocal())
continue;
// If a global constant has a section we do not try to pool it because