[llvm] Enable aggressive constant merge in GlobalMerge for AIX (PR #113956)
Zaara Syeda via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 12:37:52 PDT 2024
https://github.com/syzaara created https://github.com/llvm/llvm-project/pull/113956
Enable merging all constants without looking at use in GlobalMerge by default to replace PPCMergeStringPool pass on AIX.
>From 626fa0284c3739cdfad3c5b64fc14afab53a2f5c Mon Sep 17 00:00:00 2001
From: Zaara Syeda <syzaara at ca.ibm.com>
Date: Mon, 28 Oct 2024 15:31:31 -0400
Subject: [PATCH] Enable aggressive constant merge in GlobalMerge for AIX
Enable merging all constants without looking at use in GlobalMerge by default
to replace PPCMergeStringPool pass on AIX.
---
llvm/include/llvm/CodeGen/GlobalMerge.h | 3 +
llvm/include/llvm/CodeGen/Passes.h | 3 +-
llvm/lib/CodeGen/GlobalMerge.cpp | 13 +-
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 9 +-
llvm/test/CodeGen/PowerPC/O3-pipeline.ll | 3 -
.../PowerPC/aix-xcoff-mergeable-const.ll | 6 +-
.../PowerPC/aix-xcoff-mergeable-str.ll | 9 +-
.../PowerPC/aix-xcoff-used-with-stringpool.ll | 6 +-
llvm/test/CodeGen/PowerPC/merge-private.ll | 4 +-
.../PowerPC/mergeable-string-pool-large.ll | 143 +++++++++---------
.../PowerPC/mergeable-string-pool-tls.ll | 65 ++++----
.../CodeGen/PowerPC/mergeable-string-pool.ll | 130 ++++++++--------
12 files changed, 214 insertions(+), 180 deletions(-)
diff --git a/llvm/include/llvm/CodeGen/GlobalMerge.h b/llvm/include/llvm/CodeGen/GlobalMerge.h
index 1577bcf8903f52..f1fb467fc77576 100644
--- a/llvm/include/llvm/CodeGen/GlobalMerge.h
+++ b/llvm/include/llvm/CodeGen/GlobalMerge.h
@@ -30,6 +30,9 @@ struct GlobalMergeOptions {
bool MergeExternal = true;
/// Whether we should merge constant global variables.
bool MergeConstantGlobals = false;
+ /// Whether we should merge constant global variables aggressively without
+ /// looking at use.
+ bool MergeConstAggressive = false;
/// Whether we should try to optimize for size only.
/// Currently, this applies a dead simple heuristic: only consider globals
/// used in minsize functions for merging.
diff --git a/llvm/include/llvm/CodeGen/Passes.h b/llvm/include/llvm/CodeGen/Passes.h
index e12c1f076f133c..a3dc2551e1133b 100644
--- a/llvm/include/llvm/CodeGen/Passes.h
+++ b/llvm/include/llvm/CodeGen/Passes.h
@@ -480,7 +480,8 @@ namespace llvm {
Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
bool OnlyOptimizeForSize = false,
bool MergeExternalByDefault = false,
- bool MergeConstantByDefault = false);
+ bool MergeConstantByDefault = false,
+ bool MergeConstAggressiveByDefault = false);
/// This pass splits the stack into a safe stack and an unsafe stack to
/// protect against stack-based overflow vulnerabilities.
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp
index 4c6c8c600ee2bb..9a939d06946dff 100644
--- a/llvm/lib/CodeGen/GlobalMerge.cpp
+++ b/llvm/lib/CodeGen/GlobalMerge.cpp
@@ -202,12 +202,13 @@ class GlobalMerge : public FunctionPass {
explicit GlobalMerge(const TargetMachine *TM, unsigned MaximalOffset,
bool OnlyOptimizeForSize, bool MergeExternalGlobals,
- bool MergeConstantGlobals)
+ bool MergeConstantGlobals, bool MergeConstAggressive)
: FunctionPass(ID), TM(TM) {
Opt.MaxOffset = MaximalOffset;
Opt.SizeOnly = OnlyOptimizeForSize;
Opt.MergeExternal = MergeExternalGlobals;
Opt.MergeConstantGlobals = MergeConstantGlobals;
+ Opt.MergeConstAggressive = MergeConstAggressive;
initializeGlobalMergePass(*PassRegistry::getPassRegistry());
}
@@ -268,7 +269,7 @@ bool GlobalMergeImpl::doMerge(SmallVectorImpl<GlobalVariable *> &Globals,
});
// If we want to just blindly group all globals together, do so.
- if (!GlobalMergeGroupByUse || (GlobalMergeAllConst && isConst)) {
+ if (!GlobalMergeGroupByUse || (Opt.MergeConstAggressive && isConst)) {
BitVector AllGlobals(Globals.size());
AllGlobals.set();
return doMerge(Globals, AllGlobals, M, isConst, AddrSpace);
@@ -758,10 +759,14 @@ bool GlobalMergeImpl::run(Module &M) {
Pass *llvm::createGlobalMergePass(const TargetMachine *TM, unsigned Offset,
bool OnlyOptimizeForSize,
bool MergeExternalByDefault,
- bool MergeConstantByDefault) {
+ bool MergeConstantByDefault,
+ bool MergeConstAggressiveByDefault) {
bool MergeExternal = (EnableGlobalMergeOnExternal == cl::BOU_UNSET) ?
MergeExternalByDefault : (EnableGlobalMergeOnExternal == cl::BOU_TRUE);
bool MergeConstant = EnableGlobalMergeOnConst || MergeConstantByDefault;
+ bool MergeConstAggressive = GlobalMergeAllConst.getNumOccurrences() > 0
+ ? GlobalMergeAllConst
+ : MergeConstAggressiveByDefault;
return new GlobalMerge(TM, Offset, OnlyOptimizeForSize, MergeExternal,
- MergeConstant);
+ MergeConstant, MergeConstAggressive);
}
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index cd188304595e18..133c47174570cc 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -505,10 +505,13 @@ bool PPCPassConfig::addPreISel() {
? EnableGlobalMerge
: (TM->getTargetTriple().isOSAIX() &&
getOptLevel() != CodeGenOptLevel::None))
- addPass(
- createGlobalMergePass(TM, GlobalMergeMaxOffset, false, false, true));
+ addPass(createGlobalMergePass(TM, GlobalMergeMaxOffset, false, false, true,
+ true));
- if (MergeStringPool && getOptLevel() != CodeGenOptLevel::None)
+ if ((MergeStringPool.getNumOccurrences() > 0)
+ ? MergeStringPool
+ : (TM->getTargetTriple().isOSLinux() &&
+ getOptLevel() != CodeGenOptLevel::None))
addPass(createPPCMergeStringPoolPass());
if (!DisableInstrFormPrep && getOptLevel() != CodeGenOptLevel::None)
diff --git a/llvm/test/CodeGen/PowerPC/O3-pipeline.ll b/llvm/test/CodeGen/PowerPC/O3-pipeline.ll
index 21bd4bb8502c3d..8aeea4ba045bf3 100644
--- a/llvm/test/CodeGen/PowerPC/O3-pipeline.ll
+++ b/llvm/test/CodeGen/PowerPC/O3-pipeline.ll
@@ -70,9 +70,6 @@
; CHECK-NEXT: CodeGen Prepare
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Exception handling preparation
-; CHECK-NEXT: PPC Merge String Pool
-; CHECK-NEXT: FunctionPass Manager
-; CHECK-NEXT: Dominator Tree Construction
; 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/aix-xcoff-mergeable-const.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-const.ll
index c7b1d2a0771c1f..f14901017982b4 100644
--- a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-const.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-const.ll
@@ -1,13 +1,13 @@
; This file tests the codegen of mergeable const in AIX assembly.
; This file also tests mergeable const in XCOFF object file generation.
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
-; RUN: -data-sections=false -xcoff-traceback-table=false < %s | \
+; RUN: -global-merge-all-const=false -data-sections=false -xcoff-traceback-table=false < %s | \
; RUN: FileCheck --check-prefixes=CHECK,CHECK32 %s
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
-; RUN: -xcoff-traceback-table=false -data-sections=false < %s | \
+; RUN: -global-merge-all-const=false -xcoff-traceback-table=false -data-sections=false < %s | \
; RUN: FileCheck --check-prefixes=CHECK,CHECK64 %s
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
-; RUN: -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s
+; RUN: -global-merge-all-const=false -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s
; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s
; RUN: llvm-readobj -s %t.o | FileCheck --check-prefix=CHECKSYM %s
diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll
index f70428b1028951..5462240846994f 100644
--- a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll
@@ -4,12 +4,15 @@
; tests for XCOFF object files.
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \
-; RUN: -mtriple powerpc-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | FileCheck %s
+; RUN: -mtriple powerpc-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false \
+; RUN: -global-merge-all-const=false < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \
-; RUN: -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | FileCheck %s
+; RUN: -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false \
+; RUN: -global-merge-all-const=false < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
-; RUN: -xcoff-traceback-table=false -data-sections=false -ppc-merge-string-pool=false -filetype=obj -o %t.o < %s
+; RUN: -xcoff-traceback-table=false -data-sections=false -ppc-merge-string-pool=false \
+; RUN: -global-merge-all-const=false -filetype=obj -o %t.o < %s
; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s
@magic16 = private unnamed_addr constant [4 x i16] [i16 264, i16 272, i16 213, i16 0], align 2
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 fa9a8fb457518a..7f93661c37ee8c 100644
--- a/llvm/test/CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll
@@ -1,10 +1,12 @@
;; Test that the string pooling pass does not pool globals that are
;; in llvm.used or in llvm.compiler.used.
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple powerpc-ibm-aix-xcoff -data-sections=false < %s | \
+; 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: FileCheck %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %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: FileCheck %s
@keep_this = internal constant [5 x i8] c"keep1", align 1
diff --git a/llvm/test/CodeGen/PowerPC/merge-private.ll b/llvm/test/CodeGen/PowerPC/merge-private.ll
index 0ca706abb275fc..d3f29108264233 100644
--- a/llvm/test/CodeGen/PowerPC/merge-private.ll
+++ b/llvm/test/CodeGen/PowerPC/merge-private.ll
@@ -1,9 +1,9 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -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=AIX64
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -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=AIX32
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \
; RUN: -ppc-asm-full-reg-names -ppc-global-merge=true < %s | FileCheck %s \
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
index b182763ccc1462..27923e47b86b66 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
-; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \
+; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 -ppc-global-merge-max-offset=50000 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX32
-; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 \
+; 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: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64BE
@@ -242,10 +242,8 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
-; AIX32-NEXT: addi r3, r3, -29924
-; AIX32-NEXT: addis r3, r3, 1
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -257,11 +255,8 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: li r4, 0
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
-; AIX64-NEXT: ori r4, r4, 35612
-; AIX64-NEXT: add r3, r3, r4
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -318,17 +313,16 @@ define dso_local signext i32 @array0() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -96(r1)
-; AIX32-NEXT: lis r6, 0
-; AIX32-NEXT: lwz r5, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: li r4, 12
+; AIX32-NEXT: lwz r6, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: li r7, 24
; AIX32-NEXT: addi r3, r1, 64
+; AIX32-NEXT: li r4, 12
; AIX32-NEXT: stw r0, 104(r1)
-; AIX32-NEXT: ori r7, r6, 35596
-; AIX32-NEXT: rlwimi r4, r3, 0, 30, 27
-; AIX32-NEXT: lxvw4x vs0, r5, r7
-; AIX32-NEXT: stxvw4x vs0, 0, r4
-; AIX32-NEXT: ori r4, r6, 35584
-; AIX32-NEXT: lxvw4x vs0, r5, r4
+; AIX32-NEXT: mr r5, r3
+; AIX32-NEXT: lxvw4x vs0, r6, r7
+; AIX32-NEXT: rlwimi r5, r4, 0, 28, 29
+; AIX32-NEXT: stxvw4x vs0, 0, r5
+; AIX32-NEXT: lxvw4x vs0, r6, r4
; AIX32-NEXT: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
; AIX32-NEXT: nop
@@ -341,15 +335,14 @@ define dso_local signext i32 @array0() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -144(r1)
-; AIX64-NEXT: li r3, 0
-; AIX64-NEXT: ld r4, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: li r4, 24
; AIX64-NEXT: std r0, 160(r1)
-; AIX64-NEXT: ori r5, r3, 35596
-; AIX64-NEXT: ori r3, r3, 35584
-; AIX64-NEXT: lxvw4x vs0, r4, r5
-; AIX64-NEXT: addi r5, r1, 124
-; AIX64-NEXT: stxvw4x vs0, 0, r5
-; AIX64-NEXT: lxvw4x vs0, r4, r3
+; AIX64-NEXT: lxvw4x vs0, r3, r4
+; AIX64-NEXT: addi r4, r1, 124
+; AIX64-NEXT: stxvw4x vs0, 0, r4
+; AIX64-NEXT: li r4, 12
+; AIX64-NEXT: lxvw4x vs0, r3, r4
; AIX64-NEXT: addi r3, r1, 112
; AIX64-NEXT: stxvw4x vs0, 0, r3
; AIX64-NEXT: bl .calleeInt[PR]
@@ -418,28 +411,35 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -176(r1)
-; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r4, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: li r3, 136
; AIX32-NEXT: li r5, 96
-; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stw r0, 184(r1)
-; AIX32-NEXT: lxvw4x vs0, r4, r5
+; AIX32-NEXT: lxvw4x vs0, r4, r3
+; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 80
+; AIX32-NEXT: li r5, 120
; AIX32-NEXT: lxvw4x vs0, r4, r5
+; AIX32-NEXT: li r5, 80
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 64
+; AIX32-NEXT: li r5, 104
; AIX32-NEXT: lxvw4x vs0, r4, r5
+; AIX32-NEXT: li r5, 64
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 48
+; AIX32-NEXT: li r5, 88
; AIX32-NEXT: lxvw4x vs0, r4, r5
+; AIX32-NEXT: li r5, 48
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 32
+; AIX32-NEXT: li r5, 72
; AIX32-NEXT: lxvw4x vs0, r4, r5
+; AIX32-NEXT: li r5, 32
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 16
+; AIX32-NEXT: li r5, 56
; AIX32-NEXT: lxvw4x vs0, r4, r5
+; AIX32-NEXT: li r5, 16
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: lxvw4x vs0, 0, r4
+; AIX32-NEXT: li r5, 40
+; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
; AIX32-NEXT: nop
@@ -452,28 +452,35 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -224(r1)
-; AIX64-NEXT: ld r4, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r4, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: li r3, 136
; AIX64-NEXT: li r5, 96
-; AIX64-NEXT: addi r3, r1, 112
; AIX64-NEXT: std r0, 240(r1)
-; AIX64-NEXT: lxvw4x vs0, r4, r5
+; AIX64-NEXT: lxvw4x vs0, r4, r3
+; AIX64-NEXT: addi r3, r1, 112
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 80
+; AIX64-NEXT: li r5, 120
; AIX64-NEXT: lxvw4x vs0, r4, r5
+; AIX64-NEXT: li r5, 80
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 64
+; AIX64-NEXT: li r5, 104
; AIX64-NEXT: lxvw4x vs0, r4, r5
+; AIX64-NEXT: li r5, 64
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 48
+; AIX64-NEXT: li r5, 88
; AIX64-NEXT: lxvw4x vs0, r4, r5
+; AIX64-NEXT: li r5, 48
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 32
+; AIX64-NEXT: li r5, 72
; AIX64-NEXT: lxvw4x vs0, r4, r5
+; AIX64-NEXT: li r5, 32
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 16
+; AIX64-NEXT: li r5, 56
; AIX64-NEXT: lxvw4x vs0, r4, r5
+; AIX64-NEXT: li r5, 16
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: lxvw4x vs0, 0, r4
+; AIX64-NEXT: li r5, 40
+; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: stxvw4x vs0, 0, r3
; AIX64-NEXT: bl .calleeInt[PR]
; AIX64-NEXT: nop
@@ -565,34 +572,34 @@ define dso_local signext i32 @array2() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -176(r1)
-; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: li r3, 208
+; AIX32-NEXT: lwz r4, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: li r3, 248
; AIX32-NEXT: li r5, 96
; AIX32-NEXT: stw r0, 184(r1)
; AIX32-NEXT: lxvw4x vs0, r4, r3
; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 192
+; AIX32-NEXT: li r5, 232
; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: li r5, 80
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 176
+; AIX32-NEXT: li r5, 216
; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: li r5, 64
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 160
+; AIX32-NEXT: li r5, 200
; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: li r5, 48
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 144
+; AIX32-NEXT: li r5, 184
; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: li r5, 32
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 128
+; AIX32-NEXT: li r5, 168
; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: li r5, 16
; AIX32-NEXT: stxvw4x vs0, r3, r5
-; AIX32-NEXT: li r5, 112
+; AIX32-NEXT: li r5, 152
; AIX32-NEXT: lxvw4x vs0, r4, r5
; AIX32-NEXT: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
@@ -606,34 +613,34 @@ define dso_local signext i32 @array2() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -224(r1)
-; AIX64-NEXT: ld r4, L..C0(r2) # @__ModuleStringPool
-; AIX64-NEXT: li r3, 208
+; AIX64-NEXT: ld r4, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: li r3, 248
; AIX64-NEXT: li r5, 96
; AIX64-NEXT: std r0, 240(r1)
; AIX64-NEXT: lxvw4x vs0, r4, r3
; AIX64-NEXT: addi r3, r1, 112
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 192
+; AIX64-NEXT: li r5, 232
; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: li r5, 80
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 176
+; AIX64-NEXT: li r5, 216
; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: li r5, 64
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 160
+; AIX64-NEXT: li r5, 200
; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: li r5, 48
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 144
+; AIX64-NEXT: li r5, 184
; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: li r5, 32
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 128
+; AIX64-NEXT: li r5, 168
; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: li r5, 16
; AIX64-NEXT: stxvw4x vs0, r3, r5
-; AIX64-NEXT: li r5, 112
+; AIX64-NEXT: li r5, 152
; AIX64-NEXT: lxvw4x vs0, r4, r5
; AIX64-NEXT: stxvw4x vs0, 0, r3
; AIX64-NEXT: bl .calleeInt[PR]
@@ -740,12 +747,12 @@ define dso_local signext i32 @array3() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -224(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 232(r1)
; AIX32-NEXT: stw r31, 220(r1) # 4-byte Folded Spill
; AIX32-NEXT: addi r31, r1, 56
; AIX32-NEXT: li r5, 160
-; AIX32-NEXT: addi r4, r3, 224
+; AIX32-NEXT: addi r4, r3, 264
; AIX32-NEXT: mr r3, r31
; AIX32-NEXT: bl .___memmove[PR]
; AIX32-NEXT: nop
@@ -762,12 +769,12 @@ define dso_local signext i32 @array3() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -288(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 304(r1)
; AIX64-NEXT: std r31, 280(r1) # 8-byte Folded Spill
; AIX64-NEXT: addi r31, r1, 120
; AIX64-NEXT: li r5, 160
-; AIX64-NEXT: addi r4, r3, 224
+; AIX64-NEXT: addi r4, r3, 264
; AIX64-NEXT: mr r3, r31
; AIX64-NEXT: bl .___memmove64[PR]
; AIX64-NEXT: nop
@@ -839,12 +846,12 @@ define dso_local signext i32 @array4() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -384(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 392(r1)
; AIX32-NEXT: stw r31, 380(r1) # 4-byte Folded Spill
; AIX32-NEXT: addi r31, r1, 56
; AIX32-NEXT: li r5, 320
-; AIX32-NEXT: addi r4, r3, 384
+; AIX32-NEXT: addi r4, r3, 424
; AIX32-NEXT: mr r3, r31
; AIX32-NEXT: bl .___memmove[PR]
; AIX32-NEXT: nop
@@ -861,12 +868,12 @@ define dso_local signext i32 @array4() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -448(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 464(r1)
; AIX64-NEXT: std r31, 440(r1) # 8-byte Folded Spill
; AIX64-NEXT: addi r31, r1, 120
; AIX64-NEXT: li r5, 320
-; AIX64-NEXT: addi r4, r3, 384
+; AIX64-NEXT: addi r4, r3, 424
; AIX64-NEXT: mr r3, r31
; AIX64-NEXT: bl .___memmove64[PR]
; AIX64-NEXT: nop
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll
index fde135246c2a98..1f2ee88ea7645c 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-tls.ll
@@ -1,9 +1,8 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \
-; RUN: -ppc-asm-full-reg-names -enable-global-merge=false < %s | FileCheck %s \
+; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
; RUN: --check-prefix=CHECK64
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \
-; RUN: -ppc-asm-full-reg-names -enable-global-merge=false < %s | FileCheck %s \
+; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
; RUN: --check-prefix=CHECK32
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
@@ -31,14 +30,13 @@ define void @print_tls_func() {
; CHECK64-NEXT: stdu r1, -112(r1)
; CHECK64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
; CHECK64-NEXT: std r0, 128(r1)
-; CHECK64-NEXT: ld r6, L..C1(r2) # @__ModuleStringPool
+; CHECK64-NEXT: ld r6, L..C1(r2) # @_MergedGlobals
; CHECK64-NEXT: bla .__tls_get_mod[PR]
; CHECK64-NEXT: ld r4, L..C2(r2) # target-flags(ppc-tlsld) @a
; CHECK64-NEXT: ld r5, L..C3(r2) # target-flags(ppc-tlsld) @b
; CHECK64-NEXT: add r4, r3, r4
; CHECK64-NEXT: add r5, r3, r5
-; CHECK64-NEXT: addi r3, r6, 71
-; CHECK64-NEXT: addi r6, r6, 56
+; CHECK64-NEXT: addi r3, r6, 72
; CHECK64-NEXT: bl .printf[PR]
; CHECK64-NEXT: nop
; CHECK64-NEXT: addi r1, r1, 112
@@ -52,14 +50,13 @@ define void @print_tls_func() {
; CHECK32-NEXT: stwu r1, -64(r1)
; CHECK32-NEXT: lwz r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
; CHECK32-NEXT: stw r0, 72(r1)
-; CHECK32-NEXT: lwz r6, L..C1(r2) # @__ModuleStringPool
+; CHECK32-NEXT: lwz r6, L..C1(r2) # @_MergedGlobals
; CHECK32-NEXT: bla .__tls_get_mod[PR]
; CHECK32-NEXT: lwz r4, L..C2(r2) # target-flags(ppc-tlsld) @a
; CHECK32-NEXT: lwz r5, L..C3(r2) # target-flags(ppc-tlsld) @b
; CHECK32-NEXT: add r4, r3, r4
; CHECK32-NEXT: add r5, r3, r5
-; CHECK32-NEXT: addi r3, r6, 71
-; CHECK32-NEXT: addi r6, r6, 56
+; CHECK32-NEXT: addi r3, r6, 72
; CHECK32-NEXT: bl .printf[PR]
; CHECK32-NEXT: nop
; CHECK32-NEXT: addi r1, r1, 64
@@ -134,9 +131,9 @@ define void @test_func() {
; CHECK64: # %bb.0: # %entry
; CHECK64-NEXT: mflr r0
; CHECK64-NEXT: stdu r1, -112(r1)
-; CHECK64-NEXT: ld r3, L..C1(r2) # @__ModuleStringPool
+; CHECK64-NEXT: ld r3, L..C1(r2) # @_MergedGlobals
; CHECK64-NEXT: std r0, 128(r1)
-; CHECK64-NEXT: addi r3, r3, 16
+; CHECK64-NEXT: addi r3, r3, 32
; CHECK64-NEXT: bl .callee[PR]
; CHECK64-NEXT: nop
; CHECK64-NEXT: addi r1, r1, 112
@@ -148,9 +145,9 @@ define void @test_func() {
; CHECK32: # %bb.0: # %entry
; CHECK32-NEXT: mflr r0
; CHECK32-NEXT: stwu r1, -64(r1)
-; CHECK32-NEXT: lwz r3, L..C1(r2) # @__ModuleStringPool
+; CHECK32-NEXT: lwz r3, L..C1(r2) # @_MergedGlobals
; CHECK32-NEXT: stw r0, 72(r1)
-; CHECK32-NEXT: addi r3, r3, 16
+; CHECK32-NEXT: addi r3, r3, 32
; CHECK32-NEXT: bl .callee[PR]
; CHECK32-NEXT: nop
; CHECK32-NEXT: addi r1, r1, 64
@@ -201,8 +198,9 @@ define void @test_func2() {
; CHECK64: # %bb.0: # %entry
; CHECK64-NEXT: mflr r0
; CHECK64-NEXT: stdu r1, -112(r1)
-; CHECK64-NEXT: ld r3, L..C1(r2) # @__ModuleStringPool
+; CHECK64-NEXT: ld r3, L..C1(r2) # @_MergedGlobals
; CHECK64-NEXT: std r0, 128(r1)
+; CHECK64-NEXT: addi r3, r3, 16
; CHECK64-NEXT: bl .callee2[PR]
; CHECK64-NEXT: nop
; CHECK64-NEXT: addi r1, r1, 112
@@ -214,8 +212,9 @@ define void @test_func2() {
; CHECK32: # %bb.0: # %entry
; CHECK32-NEXT: mflr r0
; CHECK32-NEXT: stwu r1, -64(r1)
-; CHECK32-NEXT: lwz r3, L..C1(r2) # @__ModuleStringPool
+; CHECK32-NEXT: lwz r3, L..C1(r2) # @_MergedGlobals
; CHECK32-NEXT: stw r0, 72(r1)
+; CHECK32-NEXT: addi r3, r3, 16
; CHECK32-NEXT: bl .callee2[PR]
; CHECK32-NEXT: nop
; CHECK32-NEXT: addi r1, r1, 64
@@ -268,13 +267,17 @@ entry:
; CHECK64: .csect b[TL],2
; CHECK64-NEXT: .lglobl b[TL]
; CHECK64-NEXT: .string "tls2"
-; CHECK64: .csect L..__ModuleStringPool[RO],2
-; CHECK64-NEXT: .align 2
-; CHECK64-NEXT: .vbyte 4, 0x42af999a
+; CHECK64: .csect L.._MergedGlobals[RO],2
+; CHECK64: .align 2
+; CHECK64-LABEL: c:
+; CHECK64: .string "Regular global"
+; CHECK64-LABEL: e:
+; CHECK64: .vbyte 4, 0x42af999a
; CHECK64-NEXT: .vbyte 4, 0x42b1999a
; CHECK64-NEXT: .vbyte 4, 0x42b3cccd
; CHECK64-NEXT: .vbyte 4, 0x42b5999a
-; CHECK64-NEXT: .vbyte 4, 1
+; CHECK64-LABEL: d:
+; CHECK64: .vbyte 4, 1
; CHECK64-NEXT: .vbyte 4, 2
; CHECK64-NEXT: .vbyte 4, 3
; CHECK64-NEXT: .vbyte 4, 4
@@ -284,10 +287,10 @@ entry:
; CHECK64-NEXT: .vbyte 4, 8
; CHECK64-NEXT: .vbyte 4, 9
; CHECK64-NEXT: .vbyte 4, 10
-; CHECK64-NEXT: .string "Regular global"
-; CHECK64-NEXT: .byte 'T,'L,'S,' ,'v,'a,'r,'i,'a,'b,'l,'e,' ,'1,',,' ,'2,' ,'a,'n,'d,' ,'n,'o,'n,'-,'T,'L,'S,' ,'v,'a,'r,':,' ,'%,'s,',,' ,'%,'s,',,' ,'%,'s,0012,0000
+; CHECK64-LABEL: L...str
+; CHECK64: .byte 'T,'L,'S,' ,'v,'a,'r,'i,'a,'b,'l,'e,' ,'1,',,' ,'2,' ,'a,'n,'d,' ,'n,'o,'n,'-,'T,'L,'S,' ,'v,'a,'r,':,' ,'%,'s,',,' ,'%,'s,',,' ,'%,'s,0012,0000
; CHECK64: L..C1:
-; CHECK64-NEXT: .tc L..__ModuleStringPool[TC],L..__ModuleStringPool[RO]
+; CHECK64-NEXT: .tc L.._MergedGlobals[TC],L.._MergedGlobals[RO]
; CHECK64: L..C2:
; CHECK64-NEXT: .tc a[TC],a[TL]@ld
; CHECK64: L..C3:
@@ -299,13 +302,17 @@ entry:
; CHECK32: .csect b[TL],2
; CHECK32-NEXT: .lglobl b[TL]
; CHECK32-NEXT: .string "tls2"
-; CHECK32: .csect L..__ModuleStringPool[RO],2
-; CHECK32-NEXT: .align 2
-; CHECK32-NEXT: .vbyte 4, 0x42af999a
+; CHECK32: .csect L.._MergedGlobals[RO],2
+; CHECK32: .align 2
+; CHECK32-LABEL: c:
+; CHECK32: .string "Regular global"
+; CHECK32-LABEL: e:
+; CHECK32: .vbyte 4, 0x42af999a
; CHECK32-NEXT: .vbyte 4, 0x42b1999a
; CHECK32-NEXT: .vbyte 4, 0x42b3cccd
; CHECK32-NEXT: .vbyte 4, 0x42b5999a
-; CHECK32-NEXT: .vbyte 4, 1
+; CHECK32-LABEL: d:
+; CHECK32: .vbyte 4, 1
; CHECK32-NEXT: .vbyte 4, 2
; CHECK32-NEXT: .vbyte 4, 3
; CHECK32-NEXT: .vbyte 4, 4
@@ -315,10 +322,10 @@ entry:
; CHECK32-NEXT: .vbyte 4, 8
; CHECK32-NEXT: .vbyte 4, 9
; CHECK32-NEXT: .vbyte 4, 10
-; CHECK32-NEXT: .string "Regular global"
-; CHECK32-NEXT: .byte 'T,'L,'S,' ,'v,'a,'r,'i,'a,'b,'l,'e,' ,'1,',,' ,'2,' ,'a,'n,'d,' ,'n,'o,'n,'-,'T,'L,'S,' ,'v,'a,'r,':,' ,'%,'s,',,' ,'%,'s,',,' ,'%,'s,0012,0000
+; CHECK32-LABEL: L...str:
+; CHECK32: .byte 'T,'L,'S,' ,'v,'a,'r,'i,'a,'b,'l,'e,' ,'1,',,' ,'2,' ,'a,'n,'d,' ,'n,'o,'n,'-,'T,'L,'S,' ,'v,'a,'r,':,' ,'%,'s,',,' ,'%,'s,',,' ,'%,'s,0012,0000
; CHECK32: L..C1:
-; CHECK32-NEXT: .tc L..__ModuleStringPool[TC],L..__ModuleStringPool[RO]
+; CHECK32-NEXT: .tc L.._MergedGlobals[TC],L.._MergedGlobals[RO]
; CHECK32: L..C2:
; CHECK32-NEXT: .tc a[TC],a[TL]@ld
; CHECK32: L..C3:
diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
index 833ed9fa65acf1..2a937806f4bbfd 100644
--- a/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
+++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
@@ -1,6 +1,6 @@
-; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 -enable-global-merge=false \
+; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX32,AIXDATA
-; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 -enable-global-merge=false \
+; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX64,AIXDATA
; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64BE,LINUXDATA
@@ -40,9 +40,9 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
-; AIX32-NEXT: addi r3, r3, 422
+; AIX32-NEXT: addi r3, r3, 20
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -54,9 +54,9 @@ define dso_local signext i32 @str1() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
-; AIX64-NEXT: addi r3, r3, 422
+; AIX64-NEXT: addi r3, r3, 20
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -105,9 +105,9 @@ define dso_local signext i32 @str2() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
-; AIX32-NEXT: addi r3, r3, 388
+; AIX32-NEXT: addi r3, r3, 32
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -119,9 +119,9 @@ define dso_local signext i32 @str2() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
-; AIX64-NEXT: addi r3, r3, 388
+; AIX64-NEXT: addi r3, r3, 32
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -170,13 +170,13 @@ define dso_local signext i32 @str3() local_unnamed_addr #0 {
; AIX32-NEXT: stwu r1, -64(r1)
; AIX32-NEXT: stw r0, 72(r1)
; AIX32-NEXT: stw r30, 56(r1) # 4-byte Folded Spill
-; AIX32-NEXT: lwz r30, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: addi r3, r30, 434
+; AIX32-NEXT: lwz r30, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: addi r3, r30, 44
; AIX32-NEXT: stw r31, 60(r1) # 4-byte Folded Spill
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: mr r31, r3
-; AIX32-NEXT: addi r3, r30, 388
+; AIX32-NEXT: addi r3, r30, 32
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: add r3, r3, r31
@@ -193,13 +193,13 @@ define dso_local signext i32 @str3() local_unnamed_addr #0 {
; AIX64-NEXT: stdu r1, -128(r1)
; AIX64-NEXT: std r0, 144(r1)
; AIX64-NEXT: std r30, 112(r1) # 8-byte Folded Spill
-; AIX64-NEXT: ld r30, L..C0(r2) # @__ModuleStringPool
-; AIX64-NEXT: addi r3, r30, 434
+; AIX64-NEXT: ld r30, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: addi r3, r30, 44
; AIX64-NEXT: std r31, 120(r1) # 8-byte Folded Spill
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: mr r31, r3
-; AIX64-NEXT: addi r3, r30, 388
+; AIX64-NEXT: addi r3, r30, 32
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: add r3, r3, r31
@@ -272,9 +272,9 @@ define dso_local signext i32 @str4() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
-; AIX32-NEXT: addi r3, r3, 446
+; AIX32-NEXT: addi r3, r3, 56
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -286,9 +286,9 @@ define dso_local signext i32 @str4() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
-; AIX64-NEXT: addi r3, r3, 446
+; AIX64-NEXT: addi r3, r3, 56
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -335,9 +335,9 @@ define dso_local signext i32 @str5() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
-; AIX32-NEXT: addi r3, r3, 493
+; AIX32-NEXT: addi r3, r3, 736
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -349,9 +349,9 @@ define dso_local signext i32 @str5() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
-; AIX64-NEXT: addi r3, r3, 493
+; AIX64-NEXT: addi r3, r3, 736
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -398,15 +398,15 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -96(r1)
-; AIX32-NEXT: lwz r5, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: li r6, 372
+; AIX32-NEXT: lwz r5, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: li r6, 308
; AIX32-NEXT: li r4, 12
; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stw r0, 104(r1)
; AIX32-NEXT: rlwimi r4, r3, 0, 30, 27
; AIX32-NEXT: lxvw4x vs0, r5, r6
; AIX32-NEXT: stxvw4x vs0, 0, r4
-; AIX32-NEXT: li r4, 360
+; AIX32-NEXT: li r4, 296
; AIX32-NEXT: lxvw4x vs0, r5, r4
; AIX32-NEXT: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
@@ -420,13 +420,13 @@ define dso_local signext i32 @array1() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -144(r1)
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
-; AIX64-NEXT: li r4, 372
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: li r4, 308
; AIX64-NEXT: std r0, 160(r1)
; AIX64-NEXT: lxvw4x vs0, r3, r4
; AIX64-NEXT: addi r4, r1, 124
; AIX64-NEXT: stxvw4x vs0, 0, r4
-; AIX64-NEXT: li r4, 360
+; AIX64-NEXT: li r4, 296
; AIX64-NEXT: lxvw4x vs0, r3, r4
; AIX64-NEXT: addi r3, r1, 112
; AIX64-NEXT: stxvw4x vs0, 0, r3
@@ -666,8 +666,8 @@ define dso_local signext i32 @str7() local_unnamed_addr #0 {
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: mr r31, r3
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: addi r3, r3, 458
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: addi r3, r3, 80
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: add r3, r3, r31
@@ -688,8 +688,8 @@ define dso_local signext i32 @str7() local_unnamed_addr #0 {
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: mr r31, r3
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
-; AIX64-NEXT: addi r3, r3, 458
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: addi r3, r3, 80
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: add r3, r3, r31
@@ -766,8 +766,8 @@ define dso_local signext i32 @mixed1() local_unnamed_addr #0 {
; AIX32-NEXT: bl .calleeInt[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: mr r31, r3
-; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: addi r3, r3, 400
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: addi r3, r3, 68
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: add r3, r3, r31
@@ -787,8 +787,8 @@ define dso_local signext i32 @mixed1() local_unnamed_addr #0 {
; AIX64-NEXT: bl .calleeInt[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: mr r31, r3
-; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool
-; AIX64-NEXT: addi r3, r3, 400
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: addi r3, r3, 68
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: add r3, r3, r31
@@ -860,15 +860,15 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; AIX32-NEXT: stwu r1, -112(r1)
; AIX32-NEXT: stw r0, 120(r1)
; AIX32-NEXT: stw r30, 104(r1) # 4-byte Folded Spill
-; AIX32-NEXT: lwz r30, L..C0(r2) # @__ModuleStringPool
-; AIX32-NEXT: li r5, 372
+; AIX32-NEXT: lwz r30, L..C0(r2) # @_MergedGlobals
+; AIX32-NEXT: li r5, 308
; AIX32-NEXT: li r4, 12
; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stw r31, 108(r1) # 4-byte Folded Spill
; AIX32-NEXT: rlwimi r4, r3, 0, 30, 27
; AIX32-NEXT: lxvw4x vs0, r30, r5
; AIX32-NEXT: stxvw4x vs0, 0, r4
-; AIX32-NEXT: li r4, 360
+; AIX32-NEXT: li r4, 296
; AIX32-NEXT: lxvw4x vs0, r30, r4
; AIX32-NEXT: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
@@ -878,11 +878,11 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; AIX32-NEXT: bl .calleeInt[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: add r31, r3, r31
-; AIX32-NEXT: addi r3, r30, 400
+; AIX32-NEXT: addi r3, r30, 68
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: add r31, r31, r3
-; AIX32-NEXT: addi r3, r30, 473
+; AIX32-NEXT: addi r3, r30, 273
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: add r3, r31, r3
@@ -899,13 +899,13 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; AIX64-NEXT: stdu r1, -160(r1)
; AIX64-NEXT: std r0, 176(r1)
; AIX64-NEXT: std r30, 144(r1) # 8-byte Folded Spill
-; AIX64-NEXT: ld r30, L..C0(r2) # @__ModuleStringPool
-; AIX64-NEXT: li r3, 372
+; AIX64-NEXT: ld r30, L..C0(r2) # @_MergedGlobals
+; AIX64-NEXT: li r3, 308
; AIX64-NEXT: std r31, 152(r1) # 8-byte Folded Spill
; AIX64-NEXT: lxvw4x vs0, r30, r3
; AIX64-NEXT: addi r3, r1, 124
; AIX64-NEXT: stxvw4x vs0, 0, r3
-; AIX64-NEXT: li r3, 360
+; AIX64-NEXT: li r3, 296
; AIX64-NEXT: lxvw4x vs0, r30, r3
; AIX64-NEXT: addi r3, r1, 112
; AIX64-NEXT: stxvw4x vs0, 0, r3
@@ -916,11 +916,11 @@ define dso_local signext i32 @mixed2() local_unnamed_addr #0 {
; AIX64-NEXT: bl .calleeInt[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: add r31, r3, r31
-; AIX64-NEXT: addi r3, r30, 400
+; AIX64-NEXT: addi r3, r30, 68
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: add r31, r31, r3
-; AIX64-NEXT: addi r3, r30, 473
+; AIX64-NEXT: addi r3, r30, 273
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: add r3, r31, r3
@@ -1033,8 +1033,9 @@ define dso_local signext i32 @str9() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C4(r2) # @.str.9
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
+; AIX32-NEXT: addi r3, r3, 128
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -1046,8 +1047,9 @@ define dso_local signext i32 @str9() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: ld r3, L..C4(r2) # @.str.9
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
+; AIX64-NEXT: addi r3, r3, 128
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -1092,8 +1094,9 @@ define dso_local signext i32 @str10() local_unnamed_addr #0 {
; AIX32: # %bb.0: # %entry
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -64(r1)
-; AIX32-NEXT: lwz r3, L..C5(r2) # @.str.10
+; AIX32-NEXT: lwz r3, L..C0(r2) # @_MergedGlobals
; AIX32-NEXT: stw r0, 72(r1)
+; AIX32-NEXT: addi r3, r3, 256
; AIX32-NEXT: bl .callee[PR]
; AIX32-NEXT: nop
; AIX32-NEXT: addi r1, r1, 64
@@ -1105,8 +1108,9 @@ define dso_local signext i32 @str10() local_unnamed_addr #0 {
; AIX64: # %bb.0: # %entry
; AIX64-NEXT: mflr r0
; AIX64-NEXT: stdu r1, -112(r1)
-; AIX64-NEXT: ld r3, L..C5(r2) # @.str.10
+; AIX64-NEXT: ld r3, L..C0(r2) # @_MergedGlobals
; AIX64-NEXT: std r0, 128(r1)
+; AIX64-NEXT: addi r3, r3, 256
; AIX64-NEXT: bl .callee[PR]
; AIX64-NEXT: nop
; AIX64-NEXT: addi r1, r1, 112
@@ -1148,8 +1152,18 @@ entry:
attributes #0 = { nounwind }
-; AIXDATA: .csect L..__ModuleStringPool[RO],3
-; AIXDATA: .align 3 # @__ModuleStringPool
+; AIXDATA: .csect L.._MergedGlobals[RO],7
+; AIXDATA: .align 7 # @_MergedGlobals
+; AIXDATA: .string "ABCABCABC"
+; AIXDATA: .string "str1_STRING"
+; AIXDATA: .string "str2_STRING"
+; AIXDATA: .string "str3_STRING"
+; AIXDATA: .string "str4_STRING"
+; AIXDATA: .string "MixedString"
+; AIXDATA: .byte 'S,'t,'a,'t,'i,'c,' ,'G,'l,'o,'b,'a,'l,0012,0000
+; AIXDATA: .string "str9_STRING....."
+; AIXDATA: .string "str10_STRING...."
+; AIXDATA: .string "Different String 01"
; AIXDATA: .vbyte 4, 5 # 0x5
; AIXDATA: .vbyte 4, 7 # 0x7
; AIXDATA: .vbyte 4, 9 # 0x9
@@ -1157,14 +1171,6 @@ attributes #0 = { nounwind }
; AIXDATA: .vbyte 4, 17 # 0x11
; AIXDATA: .vbyte 4, 1235 # 0x4d3
; AIXDATA: .vbyte 4, 32 # 0x20
-; AIXDATA: .string "str2_STRING"
-; AIXDATA: .string "MixedString"
-; AIXDATA: .string "ABCABCABC"
-; AIXDATA: .string "str1_STRING"
-; AIXDATA: .string "str3_STRING"
-; AIXDATA: .string "str4_STRING"
-; AIXDATA: .byte 'S,'t,'a,'t,'i,'c,' ,'G,'l,'o,'b,'a,'l,0012,0000
-; AIXDATA: .string "Different String 01"
; AIXDATA: .string "longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING"
; LINUXDATA: .L__ModuleStringPool:
More information about the llvm-commits
mailing list