-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
See https://llvm.org/docs/LangRef.html#llvm-threadlocal-address-intrinsic. Instead of directly accessing the global, the result of @llvm.threadlocal.address(ptr @g)
should be accessed.
This is required for correctness when using LLVM coroutines (not relevant for Rust), but it should also improve codegen in some cases because it will allow CSE/LICM of the TLS address calculation.
purplesyringamati865, workingjubilee, Luracasmus and ChrisDenton
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.