1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -relocation-model=pic < %s | FileCheck %s
4 ;; Test that we use do not the local alias for dso_local globals with MTE.
6 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
7 target triple = "aarch64-unknown-linux-android10000"
9 @x = dso_local global i32 1, sanitize_memtag, align 4
10 @y = dso_local global i32 1, align 4
12 ; Function Attrs: noinline optnone
13 define dso_local i32 @main() #0 {
15 ; CHECK: .Lmain$local:
16 ; CHECK-NEXT: .type .Lmain$local,@function
17 ; CHECK-NEXT: .cfi_startproc
18 ; CHECK-NEXT: // %bb.0: // %entry
19 ; CHECK-NEXT: adrp x8, :got:x
20 ; CHECK-NEXT: ldr x8, [x8, :got_lo12:x]
21 ; CHECK-NEXT: ldr w0, [x8]
24 %0 = load i32, ptr @x, align 4
28 ; Function Attrs: noinline optnone
29 define dso_local i32 @main2() #0 {
31 ; CHECK: .Lmain2$local:
32 ; CHECK-NEXT: .type .Lmain2$local,@function
33 ; CHECK-NEXT: .cfi_startproc
34 ; CHECK-NEXT: // %bb.0: // %entry
35 ; CHECK-NEXT: adrp x8, .Ly$local
36 ; CHECK-NEXT: add x8, x8, :lo12:.Ly$local
37 ; CHECK-NEXT: ldr w0, [x8]
40 %0 = load i32, ptr @y, align 4
45 attributes #0 = { noinline optnone "target-cpu"="generic" "target-features"="+mte,+v8a" }
47 !llvm.module.flags = !{!2, !3}
49 !2 = !{i32 8, !"PIC Level", i32 2}
50 !3 = !{i32 7, !"PIE Level", i32 0}