[PATCH] D45460: With -fno-plt, GOTPCREL references must use RIP

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 10:51:55 PDT 2018


espindola accepted this revision.
espindola added a comment.
This revision is now accepted and ready to land.

LGTM with nits.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:15511
 
+  // GOTPCREL references are possible without PIC when using "nonlazybind"
+  // attribute.  Always use RIP when this is found.
----------------
The comment and assert feel a bit much. It is sufficient to say that a GOTPCREL always needs (%rip).



================
Comment at: test/CodeGen/X86/no-plt.ll:6
 
+define dso_local i32 @fp_weakfunc() local_unnamed_addr #0 {
+entry:
----------------
you don't need:

dso_local
local_unnamed_addr
 "#0"
entry:

please simplify.


https://reviews.llvm.org/D45460





More information about the llvm-commits mailing list