1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/AArch64/pie.ll
Fangrui Song c0f4632683 [AArch64][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.

Split tiny_model.ll to tiny-model-{static,pic}.ll
2020-12-30 15:03:06 -08:00

15 lines
314 B
LLVM

; RUN: llc -mtriple aarch64-pc-linux -relocation-model=pic < %s | FileCheck %s
@g1 = dso_local global i32 42
define dso_local i32* @get_g1() {
; CHECK: get_g1:
; CHECK: adrp x0, g1
; CHECK-NEXT: add x0, x0, :lo12:g1
ret i32* @g1
}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"PIE Level", i32 2}