-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaipoInterprocedural optimizationsInterprocedural optimizations
Description
Bugzilla Link | 49932 |
Resolution | FIXED |
Resolved on | Jun 23, 2021 07:59 |
Version | trunk |
OS | Linux |
Blocks | #48661 #50032 |
CC | @tstellar |
Fixed by commit(s) | ad9ce81 0eae129 |
Extended Description
Note that in the example below the address of @tls_var is significant (it is not unnamed_addr): it should be different on every thread when the function is called.
$ cat test.ll
@tls_var = private thread_local constant i32 222, align 4
@const = private unnamed_addr constant i32 222, align 4
define void @main() {
start:
call void @external(i32* @const, i32* @tls_var)
ret void
}
declare void @external(i32*, i32*)
$ opt -O3 -S test.ll
; ModuleID = 'test.ll'
source_filename = "test.ll"
@const = private constant i32 222, align 4
define void @main() local_unnamed_addr {
start:
tail call void @external(i32* nonnull @const, i32* nonnull @const)
ret void
}
declare void @external(i32*, i32*) local_unnamed_addr
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaipoInterprocedural optimizationsInterprocedural optimizations