mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
66d138040b
They are currently implicit because TargetMachine::shouldAssumeDSOLocal implies dso_local. For such function declarations, clang -fno-pic emits the dso_local specifier. Adding explicit dso_local makes these tests align with the clang behavior and helps implementing an option to use GOT indirection when taking the address of a function symbol in -fno-pic (to avoid a canonical PLT entry (SHN_UNDEF with non-zero st_value)).
16 lines
429 B
LLVM
16 lines
429 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
|
|
|
|
define i8 @test() {
|
|
; CHECK-LABEL: test:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: adrp x8, foo
|
|
; CHECK-NEXT: ldrb w0, [x8, :lo12:foo]
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%0 = load i8, i8* bitcast (void (...)* @foo to i8*), align 1
|
|
ret i8 %0
|
|
}
|
|
|
|
declare dso_local void @foo(...)
|