1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/X86/fast-isel-noplt-pic.ll
Saleem Abdulrasool 6f4b31d957 FastISel: support no-PLT PIC calls on ELF x86_64
Add support for properly handling PIC code with no-PLT.  This equates to
`-fpic -fno-plt -O0` with the clang frontend.  External functions are
marked with nonlazybind, which must then be indirected through the GOT.
This allows code to be built without optimizations in PIC mode without
going through the PLT.  Addresses PR35653!

llvm-svn: 320776
2017-12-15 00:32:09 +00:00

17 lines
353 B
LLVM

; RUN: llc -mtriple x86_64-unknown-linux-gnu -O0 -fast-isel=true -relocation-model=pic -filetype asm -o - %s | FileCheck %s
declare void @f() local_unnamed_addr #0
define void @g() local_unnamed_addr {
entry:
call void @f()
ret void
}
attributes #0 = { nonlazybind }
; CHECK-LABEL: g:
; CHECK-LABEL: callq *f@GOTPCREL(%rip)
; CHECK-LABEL: retq