Skip to content

[PowerPC][NFC] Allow different orders of .extern in some test cases #89714

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

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 8 additions & 8 deletions llvm/test/CodeGen/PowerPC/aix-tls-gd-double.ll
Original file line number Diff line number Diff line change
Expand Up @@ -612,14 +612,14 @@ entry:

; External symbol reference checks for .__tls_get_addr/.__tls_get_mod

; SMALL32: .extern .__tls_get_addr[PR]
; SMALL32: .extern .__tls_get_mod[PR]
; SMALL64: .extern .__tls_get_addr[PR]
; SMALL64: .extern .__tls_get_mod[PR]
; LARGE32: .extern .__tls_get_addr[PR]
; LARGE32: .extern .__tls_get_mod[PR]
; LARGE64: .extern .__tls_get_addr[PR]
; LARGE64: .extern .__tls_get_mod[PR]
; SMALL32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please explain why the order changes with/without your change about supporting local dynamic TLS mode? Thanks very much.

Copy link
Author

Choose a reason for hiding this comment

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

Before the LD patch there is only .__tls_get_addr[PR]
After the LD patch, there is .__tls_get_addr[PR] and .__tls_get_mod[PR]

The LD patch turned some variables from GD to LD, so created new extern

Copy link
Collaborator

@chenzheng1030 chenzheng1030 Apr 24, 2024

Choose a reason for hiding this comment

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

OK. One more question is do we know why TLS external function calls are impacted by the iteration order, while for below cases:

int foo();
int bar();

int test() {
  return foo() + bar();
}

The external foo() and bar() are the same with both iteration order.

Could you please help to figure that out? And yes, like @efriedma-quic said, we may need to fix this in the compiler, not the test case.

Thanks a lot.

; SMALL32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]

; TOC entry checks

Expand Down
16 changes: 8 additions & 8 deletions llvm/test/CodeGen/PowerPC/aix-tls-gd-int.ll
Original file line number Diff line number Diff line change
Expand Up @@ -627,14 +627,14 @@ entry:

; External symbol reference checks for .__tls_get_addr/.__tls_get_mod

; SMALL32: .extern .__tls_get_addr[PR]
; SMALL32: .extern .__tls_get_mod[PR]
; SMALL64: .extern .__tls_get_addr[PR]
; SMALL64: .extern .__tls_get_mod[PR]
; LARGE32: .extern .__tls_get_addr[PR]
; LARGE32: .extern .__tls_get_mod[PR]
; LARGE64: .extern .__tls_get_addr[PR]
; LARGE64: .extern .__tls_get_mod[PR]
; SMALL32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]

; TOC entry checks

Expand Down
16 changes: 8 additions & 8 deletions llvm/test/CodeGen/PowerPC/aix-tls-gd-longlong.ll
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,14 @@ entry:

; External symbol reference checks for .__tls_get_addr/.__tls_get_mod

; SMALL32: .extern .__tls_get_addr[PR]
; SMALL32: .extern .__tls_get_mod[PR]
; SMALL64: .extern .__tls_get_addr[PR]
; SMALL64: .extern .__tls_get_mod[PR]
; LARGE32: .extern .__tls_get_addr[PR]
; LARGE32: .extern .__tls_get_mod[PR]
; LARGE64: .extern .__tls_get_addr[PR]
; LARGE64: .extern .__tls_get_mod[PR]
; SMALL32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; SMALL64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE32: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]
; LARGE64: .extern .{{__tls_get_addr|__tls_get_mod}}[PR]

; TOC entry checks

Expand Down
Loading