Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This patch is to align with gcc's behavior on __builtin_thread_pointer () on Linux. Example output of gcc: https://godbolt.org/z/9oTTW53qe
Related bugzilla of gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96200, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96955
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
26770 | X86::FS, X86::GS? | |
26772 | Can we use this method directly? https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/MachineMemOperand.h#L63 | |
26773 | We don't use else after return. | |
26774 | Not sure we have to limit it to Linux here. I found other targets don't do this check. | |
llvm/test/CodeGen/X86/thread_pointer.ll | ||
49 | Do we have to use i64? Especially we are testing X32 and X86 at the same time. |
Address part of comments. Thanks for review.
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
26774 | Yes. X86 supports TLS in many Targets. But what I'm sure is the ELF targets has defined thread pointer on document. See the last comment here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96200 |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
26774 | I think it makes sense to error out if we are not sure of it. Please add an error test, add fixme there and check x86_64-apple-darwin, x86_64-pc-windows etc. |
X86::FS, X86::GS?