diff options
| author | Sriraman Tallam <tmsriram@google.com> | 2018-04-10 22:50:05 +0000 |
|---|---|---|
| committer | Sriraman Tallam <tmsriram@google.com> | 2018-04-10 22:50:05 +0000 |
| commit | d693093a65b3b3744c5ebaa8d591ec6bb97f75cb (patch) | |
| tree | 757e9dc2e537fbed63603b1f2c1bac47bd539253 /llvm/test | |
| parent | a9a58fa236ab19b5caae32330d31e30ebdf6751f (diff) | |
| download | bcm5719-llvm-d693093a65b3b3744c5ebaa8d591ec6bb97f75cb.tar.gz bcm5719-llvm-d693093a65b3b3744c5ebaa8d591ec6bb97f75cb.zip | |
GOTPCREL references must always use RIP.
With -fno-plt, global value references can use GOTPCREL and RIP must be used.
Differential Revision: https://reviews.llvm.org/D45460
llvm-svn: 329765
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/no-plt.ll | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/no-plt.ll b/llvm/test/CodeGen/X86/no-plt.ll index 8aa60f60169..1094c0623d6 100644 --- a/llvm/test/CodeGen/X86/no-plt.ll +++ b/llvm/test/CodeGen/X86/no-plt.ll @@ -3,6 +3,12 @@ ; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-gnu \ ; RUN: | FileCheck -check-prefix=X64 --check-prefix=STATIC %s +define i32 @fp_weakfunc() { +; X64: weakfunc@GOTPCREL(%rip) + ret i32 select (i1 icmp ne (i32 ()* @weakfunc, i32 ()* null), i32 1, i32 0) +} +declare extern_weak i32 @weakfunc() nonlazybind + define void @memset_call(i8* nocapture %a, i8 %c, i32 %n) { ; X64: callq *memset@GOTPCREL(%rip) call void @llvm.memset.p0i8.i32(i8* %a, i8 %c, i32 %n, i1 false) |

