[PATCH] D19040: Remove unnecessary load via GOT when accessing globals with PIE in x86_64

Asaf Badouh via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 01:17:47 PDT 2016


AsafBadouh added inline comments.

================
Comment at: test/CodeGen/X86/global-access-pie.ll:30
@@ +29,3 @@
+; X64-LABEL: my_access_global_b:
+; X64:       movq b at GOTPCREL(%rip), %rax
+; X64-NEXT:  movl (%rax), %eax
----------------
I think that weak global symbols should not be referred with GOT.
gcc5.3.0 for example will generate:
            mov b(%rip), %rax





http://reviews.llvm.org/D19040





More information about the llvm-commits mailing list