[PATCH] D58336: [X86] Fix tls variable lowering issue with large code model

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 10:41:46 PST 2019


rnk added inline comments.


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:1150
+  // Global TLS addressing is an exception. In the medium code model,
+  // we use can use an mode when RIP wrappers are present.
+  // That signifies access to globals that are known to be "near",
----------------
"a mode"


================
Comment at: test/CodeGen/X86/code-model-elf.ll:378
 
+define dso_local i32 @load_thread_data() #0 {
+; SMALL-STATIC-LABEL: load_thread_data:
----------------
These all look the same. Is that correct for the large code model? I thought in the large code model the GOT would be in a PIC register, which I don't see below. Is that known? Maybe there should be a FIXME comment here if you don't consider that to be in scope of this change.


================
Comment at: test/CodeGen/X86/code-model-elf.ll:411
+; LARGE-PIC:       # %bb.0:
+; LARGE-PIC-NEXT:    movq    thread_data at GOTTPOFF(%rip), %rax
+; LARGE-PIC-NEXT:    movl    %fs:(%rax), %eax
----------------
Wouldn't this load need to be through the PIC register?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58336/new/

https://reviews.llvm.org/D58336





More information about the llvm-commits mailing list