1 ; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=medium| FileCheck --check-prefix=CHECK --check-prefix=MEDIUM %s
2 ; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=large | FileCheck --check-prefix=CHECK --check-prefix=LARGE %s
4 @foo = dso_local global i32 42
5 @fooa = dso_local alias i32, ptr @foo
7 @foo2 = dso_local global i64 42
8 @foo2a = dso_local alias i64, ptr @foo2
11 define dso_local i32 @bar() {
12 ; MEDIUM: addis 3, 2, fooa@toc@ha
13 ; LARGE: addis 3, 2, .L[[L0:.*]]@toc@ha
14 %a = load i32, ptr @fooa
20 ; MEDIUM: addis 3, 2, foo2a@toc@ha
21 ; MEDIUM: addi 3, 3, foo2a@toc@l
22 ; LARGE: addis 3, 2, .L[[L1:.*]]@toc@ha
23 %a = load i64, ptr @foo2a
28 ; LARGE-NEXT: .tc fooa[TC],fooa
31 ; LARGE-NEXT: .tc foo2a[TC],foo2a