Skip to content

Move the PowerPC/PPCMergeStringPool work to initializer #77352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class PPCMergeStringPool : public ModulePass {
static char ID;
PPCMergeStringPool() : ModulePass(ID) {}

bool runOnModule(Module &M) override { return mergeModuleStringPool(M); }
bool doInitialization(Module &M) override { return mergeModuleStringPool(M); }
bool runOnModule(Module &M) override { return false; }

StringRef getPassName() const override { return "PPC Merge String Pool"; }

Expand Down
14 changes: 7 additions & 7 deletions llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,16 @@ define dso_local signext i32 @array0() local_unnamed_addr #0 {
; AIX32-NEXT: mflr r0
; AIX32-NEXT: stwu r1, -96(r1)
; AIX32-NEXT: lis r6, 0
; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool
; AIX32-NEXT: li r5, 12
; AIX32-NEXT: lwz r5, L..C0(r2) # @__ModuleStringPool
; AIX32-NEXT: li r4, 12
; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stw r0, 104(r1)
; AIX32-NEXT: ori r7, r6, 35596
; AIX32-NEXT: rlwimi r5, r3, 0, 30, 27
; AIX32-NEXT: lxvw4x vs0, r4, r7
; AIX32-NEXT: stxvw4x vs0, 0, r5
; AIX32-NEXT: ori r5, r6, 35584
; AIX32-NEXT: lxvw4x vs0, r4, r5
; 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: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
; AIX32-NEXT: nop
Expand Down
16 changes: 8 additions & 8 deletions llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ 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 r4, L..C0(r2) # @__ModuleStringPool
; AIX32-NEXT: lwz r5, L..C0(r2) # @__ModuleStringPool
; AIX32-NEXT: li r6, 372
; AIX32-NEXT: li r5, 12
; AIX32-NEXT: li r4, 12
; AIX32-NEXT: addi r3, r1, 64
; AIX32-NEXT: stw r0, 104(r1)
; AIX32-NEXT: rlwimi r5, r3, 0, 30, 27
; AIX32-NEXT: lxvw4x vs0, r4, r6
; AIX32-NEXT: stxvw4x vs0, 0, r5
; AIX32-NEXT: li r5, 360
; AIX32-NEXT: lxvw4x vs0, r4, r5
; 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: lxvw4x vs0, r5, r4
; AIX32-NEXT: stxvw4x vs0, 0, r3
; AIX32-NEXT: bl .calleeInt[PR]
; AIX32-NEXT: nop
Expand Down Expand Up @@ -1148,7 +1148,7 @@ entry:

attributes #0 = { nounwind }

; AIXDATA: .csect L..__ModuleStringPool[RO],2
; AIXDATA: .csect L..__ModuleStringPool[RO],3
Copy link
Contributor

@stefanp-synopsys stefanp-synopsys Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alignment change for ModuleStringPool csect. I assume that this is the problem you are trying to fix.

; AIXDATA: .align 3 # @__ModuleStringPool
; AIXDATA: .vbyte 4, 5 # 0x5
; AIXDATA: .vbyte 4, 7 # 0x7
Expand Down