1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
4 target triple = "aarch64-unknown-linux-android"
6 @global = external hidden global i32
9 define i32* @global_addr() #0 {
11 ; CHECK: adrp x0, :pg_hi21_nc:global
12 ; CHECK: movk x0, #:prel_g3:global+4294967296
13 ; CHECK: add x0, x0, :lo12:global
17 define i32 @global_load() #0 {
19 ; CHECK: adrp x8, :pg_hi21_nc:global
20 ; CHECK: ldr w0, [x8, :lo12:global]
21 %load = load i32, i32* @global
25 define void ()* @func_addr() #0 {
27 ; CHECK: adrp x0, func
28 ; CHECK: add x0, x0, :lo12:func
32 attributes #0 = { "target-features"="+tagged-globals" }