1 ; RUN: llc -mtriple=arm64-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s 2 3 @a = internal unnamed_addr global i32 0, align 4 4 @.str = private unnamed_addr constant [6 x i8] c"test\0A\00", align 1 5 6 define i32 @get() { 7 ; CHECK: get: 8 ; CHECK: adrp x{{[0-9]+}}, a 9 ; CHECK-NEXT: ldr w{{[0-9]+}}, [x{{[0-9]}}, :lo12:a] 10 %res = load i32, i32* @a, align 4 11 ret i32 %res 12 } 13 14 define void @foo() nounwind { 15 ; CHECK: foo: 16 ; CHECK: adrp x{{[0-9]}}, .L.str 17 ; CHECK-NEXT: add x{{[0-9]}}, x{{[0-9]}}, :lo12:.L.str 18 tail call void @bar(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)) 19 ret void 20 } 21 22 declare void @bar(i8*) 23