[llvm] [PPC] Replace PPCMergeStringPool with GlobalMerge for Linux (PR #114850)
Zaara Syeda via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 10:55:26 PST 2024
https://github.com/syzaara created https://github.com/llvm/llvm-project/pull/114850
Enable merging all constants without looking at use in GlobalMerge by default to replace PPCMergeStringPool pass on Linux.
>From 68cbbf18f21f9f350de8ef1b8541f47b09873d02 Mon Sep 17 00:00:00 2001
From: Zaara Syeda <syzaara at ca.ibm.com>
Date: Thu, 31 Oct 2024 16:19:39 -0400
Subject: [PATCH] [PPC] Replace PPCMergeStringPool with GlobalMerge for Linux
---
llvm/lib/CodeGen/GlobalMerge.cpp | 19 ++
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 9 +-
llvm/test/CodeGen/PowerPC/O3-pipeline.ll | 1 +
.../CodeGen/PowerPC/PR35812-neg-cmpxchg.ll | 32 +--
.../PowerPC/aix-xcoff-used-with-stringpool.ll | 6 +-
llvm/test/CodeGen/PowerPC/ctrloop-fp128.ll | 74 ++---
.../CodeGen/PowerPC/expand-contiguous-isel.ll | 18 +-
llvm/test/CodeGen/PowerPC/licm-remat.ll | 6 +-
llvm/test/CodeGen/PowerPC/merge-private.ll | 4 +-
.../PowerPC/mergeable-string-pool-large.ll | 272 +++++++++---------
.../PowerPC/mergeable-string-pool-pr92991.ll | 4 +-
.../PowerPC/mergeable-string-pool-tls.ll | 129 ++++-----
.../CodeGen/PowerPC/mergeable-string-pool.ll | 185 ++++++------
.../CodeGen/PowerPC/toc-load-sched-bug.ll | 4 +-
14 files changed, 388 insertions(+), 375 deletions(-)
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp
index 9a939d06946dff..30f44e3d61d8b1 100644
--- a/llvm/lib/CodeGen/GlobalMerge.cpp
+++ b/llvm/lib/CodeGen/GlobalMerge.cpp
@@ -79,6 +79,7 @@
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instruction.h"
+#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
@@ -713,6 +714,24 @@ bool GlobalMergeImpl::run(Module &M) {
// Ignore all "required" globals:
if (isMustKeepGlobalVariable(&GV))
continue;
+ auto checkUsers = [] (const GlobalVariable *GV) {
+ for (const User *CurrentUser : GV->users()) {
+ if (auto *I = dyn_cast<Instruction>(CurrentUser)) {
+ // Do not merge globals in exception pads.
+ if (I->isEHPad())
+ return false;
+ if (auto *II = dyn_cast<IntrinsicInst>(I)) {
+ // Some intrinsics require a plain global.
+ if (II->getIntrinsicID() == Intrinsic::eh_typeid_for)
+ return false;
+ }
+ }
+ }
+ return true;
+ };
+
+ if (!checkUsers(&GV))
+ continue;
// Don't merge tagged globals, as each global should have its own unique
// memory tag at runtime. TODO(hctim): This can be relaxed: constant globals
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 133c47174570cc..538690090976ce 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -503,17 +503,10 @@ bool PPCPassConfig::addPreISel() {
// Specifying the command line option overrides the AIX default.
if ((EnableGlobalMerge.getNumOccurrences() > 0)
? EnableGlobalMerge
- : (TM->getTargetTriple().isOSAIX() &&
- getOptLevel() != CodeGenOptLevel::None))
+ : getOptLevel() != CodeGenOptLevel::None)
addPass(createGlobalMergePass(TM, GlobalMergeMaxOffset, false, false, true,
true));
- if ((MergeStringPool.getNumOccurrences() > 0)
- ? MergeStringPool
- : (TM->getTargetTriple().isOSLinux() &&
- getOptLevel() != CodeGenOptLevel::None))
- addPass(createPPCMergeStringPoolPass());
-
if (!DisableInstrFormPrep && getOptLevel() != CodeGenOptLevel::None)
addPass(createPPCLoopInstrFormPrepPass(getPPCTargetMachine()));
diff --git a/llvm/test/CodeGen/PowerPC/O3-pipeline.ll b/llvm/test/CodeGen/PowerPC/O3-pipeline.ll
index 8aeea4ba045bf3..f590c599586aed 100644
--- a/llvm/test/CodeGen/PowerPC/O3-pipeline.ll
+++ b/llvm/test/CodeGen/PowerPC/O3-pipeline.ll
@@ -70,6 +70,7 @@
; CHECK-NEXT: CodeGen Prepare
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Exception handling preparation
+; CHECK-NEXT: Merge internal globals
; CHECK-NEXT: Natural Loop Information
; CHECK-NEXT: Scalar Evolution Analysis
; CHECK-NEXT: Prepare loop for ppc preferred instruction forms
diff --git a/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll b/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
index 896825fcda8a81..8517783e3ebd78 100644
--- a/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
+++ b/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
@@ -39,21 +39,21 @@ define signext i32 @main() nounwind {
; CHECK-NEXT: cmplwi 3, 234
; CHECK-NEXT: bne 0, .LBB0_7
; CHECK-NEXT: # %bb.5: # %L.B0001
-; CHECK-NEXT: addis 3, 2, .L__ModuleStringPool at toc@ha
-; CHECK-NEXT: addi 3, 3, .L__ModuleStringPool at toc@l
+; CHECK-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; CHECK-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
; CHECK-NEXT: bl puts
; CHECK-NEXT: nop
; CHECK-NEXT: li 3, 0
; CHECK-NEXT: b .LBB0_9
; CHECK-NEXT: .LBB0_6: # %L.B0003
-; CHECK-NEXT: addis 3, 2, .L__ModuleStringPool at toc@ha
-; CHECK-NEXT: addi 3, 3, .L__ModuleStringPool at toc@l
-; CHECK-NEXT: addi 3, 3, 7
+; CHECK-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; CHECK-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
+; CHECK-NEXT: addi 3, 3, 16
; CHECK-NEXT: b .LBB0_8
; CHECK-NEXT: .LBB0_7: # %L.B0005
-; CHECK-NEXT: addis 3, 2, .L__ModuleStringPool at toc@ha
-; CHECK-NEXT: addi 3, 3, .L__ModuleStringPool at toc@l
-; CHECK-NEXT: addi 3, 3, 53
+; CHECK-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; CHECK-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
+; CHECK-NEXT: addi 3, 3, 64
; CHECK-NEXT: .LBB0_8: # %L.B0003
; CHECK-NEXT: bl puts
; CHECK-NEXT: nop
@@ -107,21 +107,21 @@ define signext i32 @main() nounwind {
; CHECK-P7-NEXT: cmplwi 3, 234
; CHECK-P7-NEXT: bne 0, .LBB0_7
; CHECK-P7-NEXT: # %bb.5: # %L.B0001
-; CHECK-P7-NEXT: addis 3, 2, .L__ModuleStringPool at toc@ha
-; CHECK-P7-NEXT: addi 3, 3, .L__ModuleStringPool at toc@l
+; CHECK-P7-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; CHECK-P7-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
; CHECK-P7-NEXT: bl puts
; CHECK-P7-NEXT: nop
; CHECK-P7-NEXT: li 3, 0
; CHECK-P7-NEXT: b .LBB0_9
; CHECK-P7-NEXT: .LBB0_6: # %L.B0003
-; CHECK-P7-NEXT: addis 3, 2, .L__ModuleStringPool at toc@ha
-; CHECK-P7-NEXT: addi 3, 3, .L__ModuleStringPool at toc@l
-; CHECK-P7-NEXT: addi 3, 3, 7
+; CHECK-P7-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; CHECK-P7-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
+; CHECK-P7-NEXT: addi 3, 3, 16
; CHECK-P7-NEXT: b .LBB0_8
; CHECK-P7-NEXT: .LBB0_7: # %L.B0005
-; CHECK-P7-NEXT: addis 3, 2, .L__ModuleStringPool at toc@ha
-; CHECK-P7-NEXT: addi 3, 3, .L__ModuleStringPool at toc@l
-; CHECK-P7-NEXT: addi 3, 3, 53
+; CHECK-P7-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; CHECK-P7-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
+; CHECK-P7-NEXT: addi 3, 3, 64
; CHECK-P7-NEXT: .LBB0_8: # %L.B0003
; CHECK-P7-NEXT: bl puts
; CHECK-P7-NEXT: nop
diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll
index 7f93661c37ee8c..bbcba59e2e33ac 100644
--- a/llvm/test/CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll
@@ -2,11 +2,11 @@
;; in llvm.used or in llvm.compiler.used.
; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple powerpc-ibm-aix-xcoff \
-; RUN: -ppc-merge-string-pool=true -global-merge-all-const=false -data-sections=false < %s | \
+; RUN: -data-sections=false < %s | \
; RUN: FileCheck %s
; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple powerpc64-ibm-aix-xcoff \
-; RUN: -ppc-merge-string-pool=true -global-merge-all-const=false -data-sections=false < %s | \
+; RUN: -data-sections=false < %s | \
; RUN: FileCheck %s
@keep_this = internal constant [5 x i8] c"keep1", align 1
@@ -53,7 +53,7 @@ entry:
; CHECK: keep_this:
; CHECK: .lglobl keep_this2
; CHECK: keep_this2:
-; CHECK: L..__ModuleStringPool:
+; CHECK: L.._MergedGlobals:
; CHECK: .string "str1_STRING"
; CHECK: .string "str2_STRING"
; CHECK: .string "str3_STRING"
diff --git a/llvm/test/CodeGen/PowerPC/ctrloop-fp128.ll b/llvm/test/CodeGen/PowerPC/ctrloop-fp128.ll
index 23d021a2629341..d6dd9593654011 100644
--- a/llvm/test/CodeGen/PowerPC/ctrloop-fp128.ll
+++ b/llvm/test/CodeGen/PowerPC/ctrloop-fp128.ll
@@ -9,24 +9,17 @@
define void @fmul_ctrloop_fp128() nounwind {
; PWR9-LABEL: fmul_ctrloop_fp128:
; PWR9: # %bb.0: # %entry
-; PWR9-NEXT: addis 3, 2, a at toc@ha
+; PWR9-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
; PWR9-NEXT: li 4, 4
-; PWR9-NEXT: addi 3, 3, a at toc@l
+; PWR9-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
; PWR9-NEXT: lxv 34, 0(3)
-; PWR9-NEXT: addis 3, 2, y at toc@ha
; PWR9-NEXT: mtctr 4
-; PWR9-NEXT: addis 4, 2, x at toc@ha
-; PWR9-NEXT: addi 3, 3, y at toc@l
-; PWR9-NEXT: addi 4, 4, x at toc@l
-; PWR9-NEXT: addi 3, 3, -16
-; PWR9-NEXT: addi 4, 4, -16
; PWR9-NEXT: .p2align 5
; PWR9-NEXT: .LBB0_1: # %for.body
; PWR9-NEXT: #
-; PWR9-NEXT: lxv 35, 16(4)
-; PWR9-NEXT: addi 4, 4, 16
+; PWR9-NEXT: lxv 35, 16(3)
; PWR9-NEXT: xsmulqp 3, 2, 3
-; PWR9-NEXT: stxv 35, 16(3)
+; PWR9-NEXT: stxv 35, 80(3)
; PWR9-NEXT: addi 3, 3, 16
; PWR9-NEXT: bdnz .LBB0_1
; PWR9-NEXT: # %bb.2: # %for.end
@@ -38,40 +31,33 @@ define void @fmul_ctrloop_fp128() nounwind {
; PWR8-NEXT: stdu 1, -112(1)
; PWR8-NEXT: li 3, 48
; PWR8-NEXT: std 0, 128(1)
+; PWR8-NEXT: std 30, 96(1) # 8-byte Folded Spill
+; PWR8-NEXT: std 27, 72(1) # 8-byte Folded Spill
; PWR8-NEXT: std 28, 80(1) # 8-byte Folded Spill
+; PWR8-NEXT: li 28, 16
+; PWR8-NEXT: li 27, 80
; PWR8-NEXT: std 29, 88(1) # 8-byte Folded Spill
-; PWR8-NEXT: std 30, 96(1) # 8-byte Folded Spill
-; PWR8-NEXT: li 30, 4
-; PWR8-NEXT: li 29, 16
-; PWR8-NEXT: std 26, 64(1) # 8-byte Folded Spill
; PWR8-NEXT: stxvd2x 63, 1, 3 # 16-byte Folded Spill
-; PWR8-NEXT: addis 3, 2, a at toc@ha
-; PWR8-NEXT: addi 3, 3, a at toc@l
-; PWR8-NEXT: std 27, 72(1) # 8-byte Folded Spill
-; PWR8-NEXT: lxvd2x 0, 0, 3
-; PWR8-NEXT: addis 3, 2, y at toc@ha
-; PWR8-NEXT: addi 3, 3, y at toc@l
-; PWR8-NEXT: addi 28, 3, -16
-; PWR8-NEXT: addis 3, 2, x at toc@ha
-; PWR8-NEXT: addi 3, 3, x at toc@l
-; PWR8-NEXT: addi 3, 3, -16
+; PWR8-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
+; PWR8-NEXT: li 29, 4
+; PWR8-NEXT: addi 30, 3, .L_MergedGlobals at toc@l
+; PWR8-NEXT: std 26, 64(1) # 8-byte Folded Spill
+; PWR8-NEXT: lxvd2x 0, 0, 30
; PWR8-NEXT: xxswapd 63, 0
; PWR8-NEXT: .p2align 4
; PWR8-NEXT: .LBB0_1: # %for.body
; PWR8-NEXT: #
-; PWR8-NEXT: lxvd2x 0, 3, 29
+; PWR8-NEXT: lxvd2x 0, 30, 28
; PWR8-NEXT: vmr 2, 31
-; PWR8-NEXT: addi 27, 28, 16
-; PWR8-NEXT: addi 26, 3, 16
+; PWR8-NEXT: addi 26, 30, 16
; PWR8-NEXT: xxswapd 35, 0
; PWR8-NEXT: bl __mulkf3
; PWR8-NEXT: nop
-; PWR8-NEXT: addi 30, 30, -1
+; PWR8-NEXT: addi 29, 29, -1
; PWR8-NEXT: xxswapd 0, 34
-; PWR8-NEXT: mr 3, 26
-; PWR8-NEXT: cmpldi 30, 0
-; PWR8-NEXT: stxvd2x 0, 28, 29
-; PWR8-NEXT: mr 28, 27
+; PWR8-NEXT: cmpldi 29, 0
+; PWR8-NEXT: stxvd2x 0, 30, 27
+; PWR8-NEXT: mr 30, 26
; PWR8-NEXT: bc 12, 1, .LBB0_1
; PWR8-NEXT: # %bb.2: # %for.end
; PWR8-NEXT: li 3, 48
@@ -110,9 +96,9 @@ define void @fpext_ctrloop_fp128(ptr %a) nounwind {
; PWR9-NEXT: li 4, 4
; PWR9-NEXT: addi 3, 3, -8
; PWR9-NEXT: mtctr 4
-; PWR9-NEXT: addis 4, 2, y at toc@ha
-; PWR9-NEXT: addi 4, 4, y at toc@l
-; PWR9-NEXT: addi 4, 4, -16
+; PWR9-NEXT: addis 4, 2, .L_MergedGlobals at toc@ha
+; PWR9-NEXT: addi 4, 4, .L_MergedGlobals at toc@l
+; PWR9-NEXT: addi 4, 4, 64
; PWR9-NEXT: .p2align 5
; PWR9-NEXT: .LBB1_1: # %for.body
; PWR9-NEXT: #
@@ -133,11 +119,11 @@ define void @fpext_ctrloop_fp128(ptr %a) nounwind {
; PWR8-NEXT: std 30, -16(1) # 8-byte Folded Spill
; PWR8-NEXT: stdu 1, -64(1)
; PWR8-NEXT: addi 30, 3, -8
-; PWR8-NEXT: addis 3, 2, y at toc@ha
+; PWR8-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
; PWR8-NEXT: li 29, 4
; PWR8-NEXT: std 0, 80(1)
-; PWR8-NEXT: addi 3, 3, y at toc@l
-; PWR8-NEXT: addi 28, 3, -16
+; PWR8-NEXT: addi 3, 3, .L_MergedGlobals at toc@l
+; PWR8-NEXT: addi 28, 3, 64
; PWR8-NEXT: .p2align 4
; PWR8-NEXT: .LBB1_1: # %for.body
; PWR8-NEXT: #
@@ -182,9 +168,8 @@ define void @fptrunc_ctrloop_fp128(ptr %a) nounwind {
; PWR9-NEXT: li 4, 4
; PWR9-NEXT: addi 3, 3, -8
; PWR9-NEXT: mtctr 4
-; PWR9-NEXT: addis 4, 2, x at toc@ha
-; PWR9-NEXT: addi 4, 4, x at toc@l
-; PWR9-NEXT: addi 4, 4, -16
+; PWR9-NEXT: addis 4, 2, .L_MergedGlobals at toc@ha
+; PWR9-NEXT: addi 4, 4, .L_MergedGlobals at toc@l
; PWR9-NEXT: .p2align 5
; PWR9-NEXT: .LBB2_1: # %for.body
; PWR9-NEXT: #
@@ -205,11 +190,10 @@ define void @fptrunc_ctrloop_fp128(ptr %a) nounwind {
; PWR8-NEXT: std 30, -16(1) # 8-byte Folded Spill
; PWR8-NEXT: stdu 1, -64(1)
; PWR8-NEXT: addi 30, 3, -8
-; PWR8-NEXT: addis 3, 2, x at toc@ha
+; PWR8-NEXT: addis 3, 2, .L_MergedGlobals at toc@ha
; PWR8-NEXT: li 29, 4
; PWR8-NEXT: std 0, 80(1)
-; PWR8-NEXT: addi 3, 3, x at toc@l
-; PWR8-NEXT: addi 28, 3, -16
+; PWR8-NEXT: addi 28, 3, .L_MergedGlobals at toc@l
; PWR8-NEXT: .p2align 4
; PWR8-NEXT: .LBB2_1: # %for.body
; PWR8-NEXT: #
diff --git a/llvm/test/CodeGen/PowerPC/expand-contiguous-isel.ll b/llvm/test/CodeGen/PowerPC/expand-contiguous-isel.ll
index 9e53c7e88b0e30..3668a24a538094 100644
--- a/llvm/test/CodeGen/PowerPC/expand-contiguous-isel.ll
+++ b/llvm/test/CodeGen/PowerPC/expand-contiguous-isel.ll
@@ -110,11 +110,12 @@ define i64 @_Z3fn1N4llvm9StringRefE([2 x i64] %Str.coerce) {
; CHECK-GEN-ISEL-TRUE-NEXT: mtlr r0
; CHECK-GEN-ISEL-TRUE-NEXT: blr
; CHECK-GEN-ISEL-TRUE-NEXT: .LBB0_15: # %cond.false.i
-; CHECK-GEN-ISEL-TRUE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; CHECK-GEN-ISEL-TRUE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; CHECK-GEN-ISEL-TRUE-NEXT: addi r5, r3, .L_MergedGlobals at toc@l
+; CHECK-GEN-ISEL-TRUE-NEXT: addi r3, r5, 3
+; CHECK-GEN-ISEL-TRUE-NEXT: addi r4, r5, 134
+; CHECK-GEN-ISEL-TRUE-NEXT: addi r6, r5, 38
; CHECK-GEN-ISEL-TRUE-NEXT: li r5, 225
-; CHECK-GEN-ISEL-TRUE-NEXT: addi r4, r3, .L__ModuleStringPool at toc@l
-; CHECK-GEN-ISEL-TRUE-NEXT: addi r3, r4, 53
-; CHECK-GEN-ISEL-TRUE-NEXT: addi r6, r4, 88
; CHECK-GEN-ISEL-TRUE-NEXT: bl __assert_fail
; CHECK-GEN-ISEL-TRUE-NEXT: nop
; CHECK-GEN-ISEL-TRUE-NEXT: .LBB0_16: # %if.then9
@@ -226,11 +227,12 @@ define i64 @_Z3fn1N4llvm9StringRefE([2 x i64] %Str.coerce) {
; CHECK-NEXT: mtlr r0
; CHECK-NEXT: blr
; CHECK-NEXT: .LBB0_20: # %cond.false.i
-; CHECK-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; CHECK-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; CHECK-NEXT: addi r5, r3, .L_MergedGlobals at toc@l
+; CHECK-NEXT: addi r3, r5, 3
+; CHECK-NEXT: addi r4, r5, 134
+; CHECK-NEXT: addi r6, r5, 38
; CHECK-NEXT: li r5, 225
-; CHECK-NEXT: addi r4, r3, .L__ModuleStringPool at toc@l
-; CHECK-NEXT: addi r3, r4, 53
-; CHECK-NEXT: addi r6, r4, 88
; CHECK-NEXT: bl __assert_fail
; CHECK-NEXT: nop
; CHECK-NEXT: .LBB0_21: # %if.then9
diff --git a/llvm/test/CodeGen/PowerPC/licm-remat.ll b/llvm/test/CodeGen/PowerPC/licm-remat.ll
index cf3e3ac089a498..543061b0e65153 100644
--- a/llvm/test/CodeGen/PowerPC/licm-remat.ll
+++ b/llvm/test/CodeGen/PowerPC/licm-remat.ll
@@ -20,10 +20,10 @@ declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture reado
define linkonce_odr void @ZN6snappyDecompressor_(ptr %this, ptr %writer) {
; CHECK-LABEL: ZN6snappyDecompressor_:
; CHECK: # %bb.0: # %entry
-; CHECK: addis 4, 2, .L__ModuleStringPool at toc@ha
-; CHECK: addi 26, 4, .L__ModuleStringPool at toc@l
+; CHECK: addis 4, 2, .L_MergedGlobals at toc@ha
+; CHECK: addi 26, 4, .L_MergedGlobals at toc@l
; CHECK: .LBB0_2: # %for.cond
-; CHECK-NOT: addis {{[0-9]+}}, 2, .L__ModuleStringPool at toc@ha
+; CHECK-NOT: addis {{[0-9]+}}, 2, .L_MergedGlobals at toc@ha
; CHECK: bctrl
entry:
%ip_limit_ = getelementptr inbounds %"class.snappy::SnappyDecompressor", ptr %this, i64 0, i32 2
diff --git a/llvm/test/CodeGen/PowerPC/merge-private.ll b/llvm/test/CodeGen/PowerPC/merge-private.ll
index d3f29108264233..b50783d10928e2 100644
--- a/llvm/test/CodeGen/PowerPC/merge-private.ll
+++ b/llvm/test/CodeGen/PowerPC/merge-private.ll
@@ -6,10 +6,10 @@
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
; RUN: --check-prefix=AIX32
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \
-; RUN: -ppc-asm-full-reg-names -ppc-global-merge=true < %s | FileCheck %s \
+; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
; RUN: --check-prefix=LINUX64LE
; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \
-; RUN: -ppc-asm-full-reg-names -ppc-global-merge=true < %s | FileCheck %s \
+; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
; RUN: --check-prefix=LINUX64BE
; The below run line is added to ensure that the assembly corresponding to
; the following check-prefix is generated by default on AIX (without any
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
index 27923e47b86b66..e6f6ce236bb2d9 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
@@ -3,9 +3,9 @@
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX32
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 -ppc-global-merge-max-offset=50000 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX64
-; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \
+; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 -ppc-global-merge-max-offset=50000 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64BE
-; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \
+; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 -ppc-global-merge-max-offset=50000 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64LE
@.str.1 = private unnamed_addr constant [12 x i8] c"str1_STRING\00", align 1
@@ -268,12 +268,9 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: li r4, 0
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: ori r4, r4, 35612
-; LINUX64BE-NEXT: add r3, r3, r4
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -283,20 +280,17 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
;
; LINUX64LE-LABEL: str1:
; LINUX64LE: # %bb.0: # %entry
-; LINUX64LE-NEXT: mflr r0
-; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: li r4, 0
-; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: ori r4, r4, 35612
-; LINUX64LE-NEXT: add r3, r3, r4
-; LINUX64LE-NEXT: bl callee
-; LINUX64LE-NEXT: nop
-; LINUX64LE-NEXT: addi r1, r1, 32
-; LINUX64LE-NEXT: ld r0, 16(r1)
-; LINUX64LE-NEXT: mtlr r0
-; LINUX64LE-NEXT: blr
+; LINUX64LE-NEXT: mflr r0
+; LINUX64LE-NEXT: stdu r1, -32(r1)
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: std r0, 48(r1)
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: bl callee
+; LINUX64LE-NEXT: nop
+; LINUX64LE-NEXT: addi r1, r1, 32
+; LINUX64LE-NEXT: ld r0, 16(r1)
+; LINUX64LE-NEXT: mtlr r0
+; LINUX64LE-NEXT: blr
entry:
%call = tail call signext i32 @callee(ptr noundef nonnull @.str.1)
ret i32 %call
@@ -356,15 +350,14 @@ define dso_local signext i32 @array0() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -144(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: li r4, 0
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: li r4, 24
; LINUX64BE-NEXT: std r0, 160(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: ori r5, r4, 35596
-; LINUX64BE-NEXT: ori r4, r4, 35584
-; LINUX64BE-NEXT: lxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: addi r5, r1, 124
-; LINUX64BE-NEXT: stxvw4x vs0, 0, r5
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: lxvw4x vs0, r3, r4
+; LINUX64BE-NEXT: addi r4, r1, 124
+; LINUX64BE-NEXT: stxvw4x vs0, 0, r4
+; LINUX64BE-NEXT: li r4, 12
; LINUX64BE-NEXT: lxvw4x vs0, r3, r4
; LINUX64BE-NEXT: addi r3, r1, 112
; LINUX64BE-NEXT: stxvw4x vs0, 0, r3
@@ -377,26 +370,25 @@ define dso_local signext i32 @array0() local_unnamed_addr #0 {
;
; LINUX64LE-LABEL: array0:
; LINUX64LE: # %bb.0: # %entry
-; LINUX64LE-NEXT: mflr r0
-; LINUX64LE-NEXT: stdu r1, -64(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: li r4, 0
-; LINUX64LE-NEXT: std r0, 80(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: ori r5, r4, 35596
-; LINUX64LE-NEXT: ori r4, r4, 35584
-; LINUX64LE-NEXT: lxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: addi r5, r1, 44
-; LINUX64LE-NEXT: stxvd2x vs0, 0, r5
-; LINUX64LE-NEXT: lxvd2x vs0, r3, r4
-; LINUX64LE-NEXT: addi r3, r1, 32
-; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
-; LINUX64LE-NEXT: bl calleeInt
-; LINUX64LE-NEXT: nop
-; LINUX64LE-NEXT: addi r1, r1, 64
-; LINUX64LE-NEXT: ld r0, 16(r1)
-; LINUX64LE-NEXT: mtlr r0
-; LINUX64LE-NEXT: blr
+; LINUX64LE-NEXT: mflr r0
+; LINUX64LE-NEXT: stdu r1, -64(r1)
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: li r4, 24
+; LINUX64LE-NEXT: std r0, 80(r1)
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: lxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: addi r4, r1, 44
+; LINUX64LE-NEXT: stxvd2x vs0, 0, r4
+; LINUX64LE-NEXT: li r4, 12
+; LINUX64LE-NEXT: lxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: addi r3, r1, 32
+; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
+; LINUX64LE-NEXT: bl calleeInt
+; LINUX64LE-NEXT: nop
+; LINUX64LE-NEXT: addi r1, r1, 64
+; LINUX64LE-NEXT: ld r0, 16(r1)
+; LINUX64LE-NEXT: mtlr r0
+; LINUX64LE-NEXT: blr
entry:
%IntArray = alloca [7 x i32], align 4
call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %IntArray)
@@ -493,29 +485,36 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -224(r1)
-; LINUX64BE-NEXT: addis r4, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: li r4, 136
; LINUX64BE-NEXT: li r5, 96
-; LINUX64BE-NEXT: addi r3, r1, 112
; LINUX64BE-NEXT: std r0, 240(r1)
-; LINUX64BE-NEXT: addi r4, r4, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: lxvw4x vs0, r4, r5
-; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: li r5, 80
-; LINUX64BE-NEXT: lxvw4x vs0, r4, r5
-; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: li r5, 64
-; LINUX64BE-NEXT: lxvw4x vs0, r4, r5
-; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: li r5, 48
-; LINUX64BE-NEXT: lxvw4x vs0, r4, r5
-; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: li r5, 32
-; LINUX64BE-NEXT: lxvw4x vs0, r4, r5
-; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: li r5, 16
-; LINUX64BE-NEXT: lxvw4x vs0, r4, r5
+; LINUX64BE-NEXT: addi r6, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r1, 112
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
+; LINUX64BE-NEXT: li r4, 120
; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
-; LINUX64BE-NEXT: lxvw4x vs0, 0, r4
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
+; LINUX64BE-NEXT: li r4, 80
+; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
+; LINUX64BE-NEXT: li r4, 104
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
+; LINUX64BE-NEXT: li r4, 64
+; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
+; LINUX64BE-NEXT: li r4, 88
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
+; LINUX64BE-NEXT: li r4, 48
+; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
+; LINUX64BE-NEXT: li r4, 72
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
+; LINUX64BE-NEXT: li r4, 32
+; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
+; LINUX64BE-NEXT: li r4, 56
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
+; LINUX64BE-NEXT: li r4, 16
+; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
+; LINUX64BE-NEXT: li r4, 40
+; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: stxvw4x vs0, 0, r3
; LINUX64BE-NEXT: bl calleeInt
; LINUX64BE-NEXT: nop
@@ -528,29 +527,36 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -144(r1)
-; LINUX64LE-NEXT: addis r4, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: li r4, 136
; LINUX64LE-NEXT: li r5, 96
-; LINUX64LE-NEXT: addi r3, r1, 32
; LINUX64LE-NEXT: std r0, 160(r1)
-; LINUX64LE-NEXT: addi r4, r4, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: lxvd2x vs0, r4, r5
-; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: li r5, 80
-; LINUX64LE-NEXT: lxvd2x vs0, r4, r5
-; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: li r5, 64
-; LINUX64LE-NEXT: lxvd2x vs0, r4, r5
-; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: li r5, 48
-; LINUX64LE-NEXT: lxvd2x vs0, r4, r5
-; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: li r5, 32
-; LINUX64LE-NEXT: lxvd2x vs0, r4, r5
-; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: li r5, 16
-; LINUX64LE-NEXT: lxvd2x vs0, r4, r5
+; LINUX64LE-NEXT: addi r6, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r1, 32
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
+; LINUX64LE-NEXT: li r4, 120
; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
-; LINUX64LE-NEXT: lxvd2x vs0, 0, r4
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
+; LINUX64LE-NEXT: li r4, 80
+; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: li r4, 104
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
+; LINUX64LE-NEXT: li r4, 64
+; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: li r4, 88
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
+; LINUX64LE-NEXT: li r4, 48
+; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: li r4, 72
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
+; LINUX64LE-NEXT: li r4, 32
+; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: li r4, 56
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
+; LINUX64LE-NEXT: li r4, 16
+; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
+; LINUX64LE-NEXT: li r4, 40
+; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
; LINUX64LE-NEXT: bl calleeInt
; LINUX64LE-NEXT: nop
@@ -654,35 +660,35 @@ define dso_local signext i32 @array2() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -224(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: li r4, 208
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: li r4, 248
; LINUX64BE-NEXT: li r5, 96
; LINUX64BE-NEXT: std r0, 240(r1)
-; LINUX64BE-NEXT: addi r6, r3, .L__ModuleStringPool at toc@l
+; LINUX64BE-NEXT: addi r6, r3, .L_MergedGlobals at toc@l
; LINUX64BE-NEXT: addi r3, r1, 112
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
-; LINUX64BE-NEXT: li r4, 192
+; LINUX64BE-NEXT: li r4, 232
; LINUX64BE-NEXT: stxvw4x vs0, r3, r5
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: li r4, 80
; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
-; LINUX64BE-NEXT: li r4, 176
+; LINUX64BE-NEXT: li r4, 216
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: li r4, 64
; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
-; LINUX64BE-NEXT: li r4, 160
+; LINUX64BE-NEXT: li r4, 200
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: li r4, 48
; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
-; LINUX64BE-NEXT: li r4, 144
+; LINUX64BE-NEXT: li r4, 184
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: li r4, 32
; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
-; LINUX64BE-NEXT: li r4, 128
+; LINUX64BE-NEXT: li r4, 168
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: li r4, 16
; LINUX64BE-NEXT: stxvw4x vs0, r3, r4
-; LINUX64BE-NEXT: li r4, 112
+; LINUX64BE-NEXT: li r4, 152
; LINUX64BE-NEXT: lxvw4x vs0, r6, r4
; LINUX64BE-NEXT: stxvw4x vs0, 0, r3
; LINUX64BE-NEXT: bl calleeInt
@@ -696,35 +702,35 @@ define dso_local signext i32 @array2() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -144(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: li r4, 208
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: li r4, 248
; LINUX64LE-NEXT: li r5, 96
; LINUX64LE-NEXT: std r0, 160(r1)
-; LINUX64LE-NEXT: addi r6, r3, .L__ModuleStringPool at toc@l
+; LINUX64LE-NEXT: addi r6, r3, .L_MergedGlobals at toc@l
; LINUX64LE-NEXT: addi r3, r1, 32
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
-; LINUX64LE-NEXT: li r4, 192
+; LINUX64LE-NEXT: li r4, 232
; LINUX64LE-NEXT: stxvd2x vs0, r3, r5
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: li r4, 80
; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
-; LINUX64LE-NEXT: li r4, 176
+; LINUX64LE-NEXT: li r4, 216
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: li r4, 64
; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
-; LINUX64LE-NEXT: li r4, 160
+; LINUX64LE-NEXT: li r4, 200
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: li r4, 48
; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
-; LINUX64LE-NEXT: li r4, 144
+; LINUX64LE-NEXT: li r4, 184
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: li r4, 32
; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
-; LINUX64LE-NEXT: li r4, 128
+; LINUX64LE-NEXT: li r4, 168
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: li r4, 16
; LINUX64LE-NEXT: stxvd2x vs0, r3, r4
-; LINUX64LE-NEXT: li r4, 112
+; LINUX64LE-NEXT: li r4, 152
; LINUX64LE-NEXT: lxvd2x vs0, r6, r4
; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
; LINUX64LE-NEXT: bl calleeInt
@@ -791,17 +797,17 @@ define dso_local signext i32 @array3() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -288(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 304(r1)
-; LINUX64BE-NEXT: std r30, 272(r1) # 8-byte Folded Spill
+; LINUX64BE-NEXT: std r30, 272(r1) # 8-byte Folded Spill
; LINUX64BE-NEXT: addi r30, r1, 112
; LINUX64BE-NEXT: li r5, 160
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r4, r3, 224
-; LINUX64BE-NEXT: mr r3, r30
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r4, r3, 264
+; LINUX64BE-NEXT: mr r3, r30
; LINUX64BE-NEXT: bl memcpy
; LINUX64BE-NEXT: nop
-; LINUX64BE-NEXT: mr r3, r30
+; LINUX64BE-NEXT: mr r3, r30
; LINUX64BE-NEXT: bl calleeInt
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: ld r30, 272(r1) # 8-byte Folded Reload
@@ -813,23 +819,23 @@ define dso_local signext i32 @array3() local_unnamed_addr #0 {
; LINUX64LE-LABEL: array3:
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
-; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill
+; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill
; LINUX64LE-NEXT: stdu r1, -208(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: addi r30, r1, 32
; LINUX64LE-NEXT: li r5, 160
; LINUX64LE-NEXT: std r0, 224(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r4, r3, 224
-; LINUX64LE-NEXT: mr r3, r30
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r4, r3, 264
+; LINUX64LE-NEXT: mr r3, r30
; LINUX64LE-NEXT: bl memcpy
; LINUX64LE-NEXT: nop
-; LINUX64LE-NEXT: mr r3, r30
+; LINUX64LE-NEXT: mr r3, r30
; LINUX64LE-NEXT: bl calleeInt
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 208
; LINUX64LE-NEXT: ld r0, 16(r1)
-; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
+; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
; LINUX64LE-NEXT: mtlr r0
; LINUX64LE-NEXT: blr
entry:
@@ -890,17 +896,17 @@ define dso_local signext i32 @array4() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -448(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 464(r1)
-; LINUX64BE-NEXT: std r30, 432(r1) # 8-byte Folded Spill
+; LINUX64BE-NEXT: std r30, 432(r1) # 8-byte Folded Spill
; LINUX64BE-NEXT: addi r30, r1, 112
; LINUX64BE-NEXT: li r5, 320
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r4, r3, 384
-; LINUX64BE-NEXT: mr r3, r30
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r4, r3, 424
+; LINUX64BE-NEXT: mr r3, r30
; LINUX64BE-NEXT: bl memcpy
; LINUX64BE-NEXT: nop
-; LINUX64BE-NEXT: mr r3, r30
+; LINUX64BE-NEXT: mr r3, r30
; LINUX64BE-NEXT: bl calleeInt
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: ld r30, 432(r1) # 8-byte Folded Reload
@@ -913,20 +919,20 @@ define dso_local signext i32 @array4() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -368(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 384(r1)
-; LINUX64LE-NEXT: std r30, 352(r1) # 8-byte Folded Spill
+; LINUX64LE-NEXT: std r30, 352(r1) # 8-byte Folded Spill
; LINUX64LE-NEXT: addi r30, r1, 32
; LINUX64LE-NEXT: li r5, 320
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r4, r3, 384
-; LINUX64LE-NEXT: mr r3, r30
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r4, r3, 424
+; LINUX64LE-NEXT: mr r3, r30
; LINUX64LE-NEXT: bl memcpy
; LINUX64LE-NEXT: nop
-; LINUX64LE-NEXT: mr r3, r30
+; LINUX64LE-NEXT: mr r3, r30
; LINUX64LE-NEXT: bl calleeInt
; LINUX64LE-NEXT: nop
-; LINUX64LE-NEXT: ld r30, 352(r1) # 8-byte Folded Reload
+; LINUX64LE-NEXT: ld r30, 352(r1) # 8-byte Folded Reload
; LINUX64LE-NEXT: addi r1, r1, 368
; LINUX64LE-NEXT: ld r0, 16(r1)
; LINUX64LE-NEXT: mtlr r0
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-pr92991.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-pr92991.ll
index 4e9c69e5fe4cfc..06607a3eed34df 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-pr92991.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-pr92991.ll
@@ -7,8 +7,8 @@
define void @test(ptr %p, ptr %p2) {
; CHECK-LABEL: test:
; CHECK: # %bb.0:
-; CHECK-NEXT: addis 5, 2, .L__ModuleStringPool at toc@ha
-; CHECK-NEXT: addi 5, 5, .L__ModuleStringPool at toc@l
+; CHECK-NEXT: addis 5, 2, .L_MergedGlobals at toc@ha
+; CHECK-NEXT: addi 5, 5, .L_MergedGlobals at toc@l
; CHECK-NEXT: addi 6, 5, 12
; CHECK-NEXT: std 6, 0(3)
; CHECK-NEXT: addi 3, 5, 16
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll
index 1f2ee88ea7645c..d55763bd6b16f3 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll
@@ -75,10 +75,9 @@ define void @print_tls_func() {
; LINUX64LE-NEXT: addi r4, r3, a at tprel@l
; LINUX64LE-NEXT: addis r3, r13, b at tprel@ha
; LINUX64LE-NEXT: addi r5, r3, b at tprel@l
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: addi r6, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r6, 71
-; LINUX64LE-NEXT: addi r6, r6, 56
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: addi r6, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r6, 72
; LINUX64LE-NEXT: bl printf
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 96
@@ -95,7 +94,7 @@ define void @print_tls_func() {
; LINUX64BE-NEXT: .cfi_offset lr, 16
; LINUX64BE-NEXT: .cfi_offset r30, -16
; LINUX64BE-NEXT: addis r3, r2, a at got@tlsld at ha
-; LINUX64BE-NEXT: std r30, 112(r1) # 8-byte Folded Spill
+; LINUX64BE-NEXT: std r30, 112(r1) # 8-byte Folded Spill
; LINUX64BE-NEXT: addi r3, r3, a at got@tlsld at l
; LINUX64BE-NEXT: bl __tls_get_addr(a at tlsld)
; LINUX64BE-NEXT: nop
@@ -106,15 +105,14 @@ define void @print_tls_func() {
; LINUX64BE-NEXT: bl __tls_get_addr(b at tlsld)
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addis r3, r3, b at dtprel@ha
+; LINUX64BE-NEXT: mr r4, r30
; LINUX64BE-NEXT: addi r5, r3, b at dtprel@l
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: addi r4, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r4, 71
-; LINUX64BE-NEXT: addi r6, r4, 56
-; LINUX64BE-NEXT: mr r4, r30
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: addi r6, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r6, 72
; LINUX64BE-NEXT: bl printf
; LINUX64BE-NEXT: nop
-; LINUX64BE-NEXT: ld r30, 112(r1) # 8-byte Folded Reload
+; LINUX64BE-NEXT: ld r30, 112(r1) # 8-byte Folded Reload
; LINUX64BE-NEXT: addi r1, r1, 128
; LINUX64BE-NEXT: ld r0, 16(r1)
; LINUX64BE-NEXT: mtlr r0
@@ -154,7 +152,6 @@ define void @test_func() {
; CHECK32-NEXT: lwz r0, 8(r1)
; CHECK32-NEXT: mtlr r0
; CHECK32-NEXT: blr
-;
; LINUX64LE-LABEL: test_func:
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
@@ -162,9 +159,9 @@ define void @test_func() {
; LINUX64LE-NEXT: std r0, 48(r1)
; LINUX64LE-NEXT: .cfi_def_cfa_offset 32
; LINUX64LE-NEXT: .cfi_offset lr, 16
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 16
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 32
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -179,9 +176,9 @@ define void @test_func() {
; LINUX64BE-NEXT: std r0, 128(r1)
; LINUX64BE-NEXT: .cfi_def_cfa_offset 112
; LINUX64BE-NEXT: .cfi_offset lr, 16
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 16
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 32
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -229,8 +226,9 @@ define void @test_func2() {
; LINUX64LE-NEXT: std r0, 48(r1)
; LINUX64LE-NEXT: .cfi_def_cfa_offset 32
; LINUX64LE-NEXT: .cfi_offset lr, 16
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 16
; LINUX64LE-NEXT: bl callee2
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -245,8 +243,9 @@ define void @test_func2() {
; LINUX64BE-NEXT: std r0, 128(r1)
; LINUX64BE-NEXT: .cfi_def_cfa_offset 112
; LINUX64BE-NEXT: .cfi_offset lr, 16
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 16
; LINUX64BE-NEXT: bl callee2
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -332,49 +331,51 @@ entry:
; CHECK32-NEXT: .tc b[TC],b[TL]@ld
; LINUX64LE: a:
-; LINUX64LE-NEXT: .asciz "tls1"
-; LINUX64LE-NEXT: .size a, 5
+; LINUX64LE-NEXT: .asciz "tls1"
+; LINUX64LE-NEXT: .size a, 5
; LINUX64LE: b:
-; LINUX64LE-NEXT: .asciz "tls2"
-; LINUX64LE-NEXT: .size b, 5
-; LINUX64LE: .L__ModuleStringPool:
-; LINUX64LE-NEXT: .long 0x42af999a
-; LINUX64LE-NEXT: .long 0x42b1999a
-; LINUX64LE-NEXT: .long 0x42b3cccd
-; LINUX64LE-NEXT: .long 0x42b5999a
-; LINUX64LE-NEXT: .long 1
-; LINUX64LE-NEXT: .long 2
-; LINUX64LE-NEXT: .long 3
-; LINUX64LE-NEXT: .long 4
-; LINUX64LE-NEXT: .long 5
-; LINUX64LE-NEXT: .long 6
-; LINUX64LE-NEXT: .long 7
-; LINUX64LE-NEXT: .long 8
-; LINUX64LE-NEXT: .long 9
-; LINUX64LE-NEXT: .long 10
-; LINUX64LE-NEXT: .asciz "Regular global"
-; LINUX64LE-NEXT: .asciz "TLS variable 1, 2 and non-TLS var: %s, %s, %s\n"
+; LINUX64LE-NEXT: .asciz "tls2"
+; LINUX64LE-NEXT: .size b, 5
+; LINUX64LE: .L_MergedGlobals:
+; LINUX64LE-NEXT: .asciz "Regular global"
+; LINUX64LE-NEXT: .space 1
+; LINUX64LE-NEXT: .long 0x42af999a
+; LINUX64LE-NEXT: .long 0x42b1999a
+; LINUX64LE-NEXT: .long 0x42b3cccd
+; LINUX64LE-NEXT: .long 0x42b5999a
+; LINUX64LE-NEXT: .long 1
+; LINUX64LE-NEXT: .long 2
+; LINUX64LE-NEXT: .long 3
+; LINUX64LE-NEXT: .long 4
+; LINUX64LE-NEXT: .long 5
+; LINUX64LE-NEXT: .long 6
+; LINUX64LE-NEXT: .long 7
+; LINUX64LE-NEXT: .long 8
+; LINUX64LE-NEXT: .long 9
+; LINUX64LE-NEXT: .long 10
+; LINUX64LE-NEXT: .asciz "TLS variable 1, 2 and non-TLS var: %s, %s, %s\n"
; LINUX64BE: a:
-; LINUX64BE-NEXT: .asciz "tls1"
-; LINUX64BE-NEXT: .size a, 5
+; LINUX64BE-NEXT: .asciz "tls1"
+; LINUX64BE-NEXT: .size a, 5
; LINUX64BE: b:
-; LINUX64BE-NEXT: .asciz "tls2"
-; LINUX64BE-NEXT: .size b, 5
-; LINUX64BE: .L__ModuleStringPool:
-; LINUX64BE-NEXT: .long 0x42af999a
-; LINUX64BE-NEXT: .long 0x42b1999a
-; LINUX64BE-NEXT: .long 0x42b3cccd
-; LINUX64BE-NEXT: .long 0x42b5999a
-; LINUX64BE-NEXT: .long 1
-; LINUX64BE-NEXT: .long 2
-; LINUX64BE-NEXT: .long 3
-; LINUX64BE-NEXT: .long 4
-; LINUX64BE-NEXT: .long 5
-; LINUX64BE-NEXT: .long 6
-; LINUX64BE-NEXT: .long 7
-; LINUX64BE-NEXT: .long 8
-; LINUX64BE-NEXT: .long 9
-; LINUX64BE-NEXT: .long 10
-; LINUX64BE-NEXT: .asciz "Regular global"
-; LINUX64BE-NEXT: .asciz "TLS variable 1, 2 and non-TLS var: %s, %s, %s\n"
+; LINUX64BE-NEXT: .asciz "tls2"
+; LINUX64BE-NEXT: .size b, 5
+; LINUX64BE: .L_MergedGlobals:
+; LINUX64BE-NEXT: .asciz "Regular global"
+; LINUX64BE-NEXT: .space 1
+; LINUX64BE-NEXT: .long 0x42af999a
+; LINUX64BE-NEXT: .long 0x42b1999a
+; LINUX64BE-NEXT: .long 0x42b3cccd
+; LINUX64BE-NEXT: .long 0x42b5999a
+; LINUX64BE-NEXT: .long 1
+; LINUX64BE-NEXT: .long 2
+; LINUX64BE-NEXT: .long 3
+; LINUX64BE-NEXT: .long 4
+; LINUX64BE-NEXT: .long 5
+; LINUX64BE-NEXT: .long 6
+; LINUX64BE-NEXT: .long 7
+; LINUX64BE-NEXT: .long 8
+; LINUX64BE-NEXT: .long 9
+; LINUX64BE-NEXT: .long 10
+; LINUX64BE-NEXT: .asciz "TLS variable 1, 2 and non-TLS var: %s, %s, %s\n"
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
index 2a937806f4bbfd..6a21a100bb9908 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
@@ -68,10 +68,10 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 422
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 20
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -83,10 +83,10 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 422
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 20
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -133,10 +133,10 @@ define dso_local signext i32 @str2() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 388
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 32
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -148,10 +148,10 @@ define dso_local signext i32 @str2() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 388
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 32
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -215,16 +215,16 @@ define dso_local signext i32 @str3() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -144(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 160(r1)
; LINUX64BE-NEXT: std r29, 120(r1) # 8-byte Folded Spill
-; LINUX64BE-NEXT: addi r29, r3, .L__ModuleStringPool at toc@l
+; LINUX64BE-NEXT: addi r29, r3, .L_MergedGlobals at toc@l
; LINUX64BE-NEXT: std r30, 128(r1) # 8-byte Folded Spill
-; LINUX64BE-NEXT: addi r3, r29, 434
+; LINUX64BE-NEXT: addi r3, r29, 44
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: mr r30, r3
-; LINUX64BE-NEXT: addi r3, r29, 388
+; LINUX64BE-NEXT: addi r3, r29, 32
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: add r3, r3, r30
@@ -242,14 +242,14 @@ define dso_local signext i32 @str3() local_unnamed_addr #0 {
; LINUX64LE-NEXT: std r29, -24(r1) # 8-byte Folded Spill
; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill
; LINUX64LE-NEXT: stdu r1, -64(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 80(r1)
-; LINUX64LE-NEXT: addi r29, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r29, 434
+; LINUX64LE-NEXT: addi r29, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r29, 44
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: mr r30, r3
-; LINUX64LE-NEXT: addi r3, r29, 388
+; LINUX64LE-NEXT: addi r3, r29, 32
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: add r3, r3, r30
@@ -300,10 +300,10 @@ define dso_local signext i32 @str4() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 446
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 56
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -315,10 +315,10 @@ define dso_local signext i32 @str4() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 446
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 56
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -363,10 +363,10 @@ define dso_local signext i32 @str5() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 493
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 736
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -378,10 +378,10 @@ define dso_local signext i32 @str5() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 493
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 736
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -441,14 +441,14 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -144(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: li r4, 372
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: li r4, 308
; LINUX64BE-NEXT: std r0, 160(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
; LINUX64BE-NEXT: lxvw4x vs0, r3, r4
; LINUX64BE-NEXT: addi r4, r1, 124
; LINUX64BE-NEXT: stxvw4x vs0, 0, r4
-; LINUX64BE-NEXT: li r4, 360
+; LINUX64BE-NEXT: li r4, 296
; LINUX64BE-NEXT: lxvw4x vs0, r3, r4
; LINUX64BE-NEXT: addi r3, r1, 112
; LINUX64BE-NEXT: stxvw4x vs0, 0, r3
@@ -463,14 +463,14 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -64(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: li r4, 372
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: li r4, 308
; LINUX64LE-NEXT: std r0, 80(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
; LINUX64LE-NEXT: lxvd2x vs0, r3, r4
; LINUX64LE-NEXT: addi r4, r1, 44
; LINUX64LE-NEXT: stxvd2x vs0, 0, r4
-; LINUX64LE-NEXT: li r4, 360
+; LINUX64LE-NEXT: li r4, 296
; LINUX64LE-NEXT: lxvd2x vs0, r3, r4
; LINUX64LE-NEXT: addi r3, r1, 32
; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
@@ -711,9 +711,9 @@ define dso_local signext i32 @str7() local_unnamed_addr #0 {
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: mr r30, r3
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 458
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 80
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: add r3, r3, r30
@@ -735,9 +735,9 @@ define dso_local signext i32 @str7() local_unnamed_addr #0 {
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: mr r30, r3
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 458
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 80
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: add r3, r3, r30
@@ -810,9 +810,9 @@ define dso_local signext i32 @mixed1() local_unnamed_addr #0 {
; LINUX64BE-NEXT: bl calleeInt
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: mr r30, r3
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64BE-NEXT: addi r3, r3, 400
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 68
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: add r3, r3, r30
@@ -834,9 +834,9 @@ define dso_local signext i32 @mixed1() local_unnamed_addr #0 {
; LINUX64LE-NEXT: bl calleeInt
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: mr r30, r3
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool at toc@l
-; LINUX64LE-NEXT: addi r3, r3, 400
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 68
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: add r3, r3, r30
@@ -936,16 +936,16 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -176(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 192(r1)
; LINUX64BE-NEXT: std r29, 152(r1) # 8-byte Folded Spill
-; LINUX64BE-NEXT: li r4, 372
+; LINUX64BE-NEXT: li r4, 308
; LINUX64BE-NEXT: std r30, 160(r1) # 8-byte Folded Spill
-; LINUX64BE-NEXT: addi r29, r3, .L__ModuleStringPool at toc@l
+; LINUX64BE-NEXT: addi r29, r3, .L_MergedGlobals at toc@l
; LINUX64BE-NEXT: addi r3, r1, 124
; LINUX64BE-NEXT: lxvw4x vs0, r29, r4
; LINUX64BE-NEXT: stxvw4x vs0, 0, r3
-; LINUX64BE-NEXT: li r3, 360
+; LINUX64BE-NEXT: li r3, 296
; LINUX64BE-NEXT: lxvw4x vs0, r29, r3
; LINUX64BE-NEXT: addi r3, r1, 112
; LINUX64BE-NEXT: stxvw4x vs0, 0, r3
@@ -957,11 +957,11 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; LINUX64BE-NEXT: bl calleeInt
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: add r30, r3, r30
-; LINUX64BE-NEXT: addi r3, r29, 400
+; LINUX64BE-NEXT: addi r3, r29, 68
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: add r30, r30, r3
-; LINUX64BE-NEXT: addi r3, r29, 473
+; LINUX64BE-NEXT: addi r3, r29, 273
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: add r3, r30, r3
@@ -979,14 +979,14 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; LINUX64LE-NEXT: std r29, -24(r1) # 8-byte Folded Spill
; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill
; LINUX64LE-NEXT: stdu r1, -96(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool at toc@ha
-; LINUX64LE-NEXT: li r4, 372
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
+; LINUX64LE-NEXT: li r4, 308
; LINUX64LE-NEXT: std r0, 112(r1)
-; LINUX64LE-NEXT: addi r29, r3, .L__ModuleStringPool at toc@l
+; LINUX64LE-NEXT: addi r29, r3, .L_MergedGlobals at toc@l
; LINUX64LE-NEXT: addi r3, r1, 44
; LINUX64LE-NEXT: lxvd2x vs0, r29, r4
; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
-; LINUX64LE-NEXT: li r3, 360
+; LINUX64LE-NEXT: li r3, 296
; LINUX64LE-NEXT: lxvd2x vs0, r29, r3
; LINUX64LE-NEXT: addi r3, r1, 32
; LINUX64LE-NEXT: stxvd2x vs0, 0, r3
@@ -998,11 +998,11 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; LINUX64LE-NEXT: bl calleeInt
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: add r30, r3, r30
-; LINUX64LE-NEXT: addi r3, r29, 400
+; LINUX64LE-NEXT: addi r3, r29, 68
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: add r30, r30, r3
-; LINUX64LE-NEXT: addi r3, r29, 473
+; LINUX64LE-NEXT: addi r3, r29, 273
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: add r3, r30, r3
@@ -1061,9 +1061,10 @@ define dso_local signext i32 @str9() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L.str.9 at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L.str.9 at toc@l
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 128
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -1075,9 +1076,10 @@ define dso_local signext i32 @str9() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L.str.9 at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L.str.9 at toc@l
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 128
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -1122,9 +1124,10 @@ define dso_local signext i32 @str10() local_unnamed_addr #0 {
; LINUX64BE: # %bb.0: # %entry
; LINUX64BE-NEXT: mflr r0
; LINUX64BE-NEXT: stdu r1, -112(r1)
-; LINUX64BE-NEXT: addis r3, r2, .L.str.10 at toc@ha
+; LINUX64BE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64BE-NEXT: std r0, 128(r1)
-; LINUX64BE-NEXT: addi r3, r3, .L.str.10 at toc@l
+; LINUX64BE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64BE-NEXT: addi r3, r3, 256
; LINUX64BE-NEXT: bl callee
; LINUX64BE-NEXT: nop
; LINUX64BE-NEXT: addi r1, r1, 112
@@ -1136,9 +1139,10 @@ define dso_local signext i32 @str10() local_unnamed_addr #0 {
; LINUX64LE: # %bb.0: # %entry
; LINUX64LE-NEXT: mflr r0
; LINUX64LE-NEXT: stdu r1, -32(r1)
-; LINUX64LE-NEXT: addis r3, r2, .L.str.10 at toc@ha
+; LINUX64LE-NEXT: addis r3, r2, .L_MergedGlobals at toc@ha
; LINUX64LE-NEXT: std r0, 48(r1)
-; LINUX64LE-NEXT: addi r3, r3, .L.str.10 at toc@l
+; LINUX64LE-NEXT: addi r3, r3, .L_MergedGlobals at toc@l
+; LINUX64LE-NEXT: addi r3, r3, 256
; LINUX64LE-NEXT: bl callee
; LINUX64LE-NEXT: nop
; LINUX64LE-NEXT: addi r1, r1, 32
@@ -1173,20 +1177,23 @@ attributes #0 = { nounwind }
; AIXDATA: .vbyte 4, 32 # 0x20
; AIXDATA: .string "longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING"
-; LINUXDATA: .L__ModuleStringPool:
-; LINUXDATA: .long 5 # 0x5
-; LINUXDATA: .long 7 # 0x7
-; LINUXDATA: .long 9 # 0x9
-; LINUXDATA: .long 11 # 0xb
-; LINUXDATA: .long 17 # 0x11
-; LINUXDATA: .long 1235 # 0x4d3
-; LINUXDATA: .long 32 # 0x20
-; LINUXDATA: .asciz "str2_STRING"
-; LINUXDATA: .asciz "MixedString"
-; LINUXDATA: .asciz "ABCABCABC"
-; LINUXDATA: .asciz "str1_STRING"
-; LINUXDATA: .asciz "str3_STRING"
-; LINUXDATA: .asciz "str4_STRING"
-; LINUXDATA: .asciz "Static Global\n"
-; LINUXDATA: .asciz "Different String 01"
-; LINUXDATA: .asciz "longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING"
+; LINUXDATA: .L_MergedGlobals:
+; LINUXDATA: .asciz "ABCABCABC"
+; LINUXDATA: .asciz "str1_STRING"
+; LINUXDATA: .asciz "str2_STRING"
+; LINUXDATA: .asciz "str3_STRING"
+; LINUXDATA: .asciz "str4_STRING"
+; LINUXDATA: .asciz "MixedString"
+; LINUXDATA: .asciz "Static Global\n"
+; LINUXDATA: .asciz "str9_STRING....."
+; LINUXDATA: .asciz "str10_STRING...."
+; LINUXDATA: .asciz "Different String 01"
+; LINUXDATA: .long 5 # 0x5
+; LINUXDATA: .long 7 # 0x7
+; LINUXDATA: .long 9 # 0x9
+; LINUXDATA: .long 11 # 0xb
+; LINUXDATA: .long 17 # 0x11
+; LINUXDATA: .long 1235 # 0x4d3
+; LINUXDATA: .long 32 # 0x20
+; LINUXDATA: .asciz "This is the global string that is at the top.\n"
+; LINUXDATA: .asciz "longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING"
diff --git a/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll b/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll
index c2c90864bb7f5f..74187672128c63 100644
--- a/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll
+++ b/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll
@@ -164,8 +164,8 @@ entry:
; CHECK: .globl _ZN4llvm11ParseIRFileERKSsRNS_12SMDiagnosticERNS_11LLVMContextE
; CHECK: bctrl
; CHECK: ld 2, 24(1)
-; CHECK: addis [[REG:[0-9]+]], 2, .L__ModuleStringPool at toc@ha
-; CHECK: addi {{[0-9]+}}, [[REG]], .L__ModuleStringPool at toc@l
+; CHECK: addis [[REG:[0-9]+]], 2, .L_MergedGlobals at toc@ha
+; CHECK: addi {{[0-9]+}}, [[REG]], .L_MergedGlobals at toc@l
; CHECK: bl _ZNSs6insertEmPKcm
%.atomicdst.i.i.i.i.i46 = alloca i32, align 4
%ref.tmp.i.i47 = alloca %"class.std::allocator", align 1
More information about the llvm-commits
mailing list