Kai Nacke 427fb35192 [PPC] Opaque pointer migration, part 1.
The LIT test cases were migrated with the script provided by
Nikita Popov. Due to the size of the change it is split into
several parts.

Reviewed By: nemanja, amyk, nikic, PowerPC

Differential Revision: https://reviews.llvm.org/D135470
2022-10-11 17:24:06 +00:00

32 lines
961 B
LLVM

; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=medium| FileCheck --check-prefix=CHECK --check-prefix=MEDIUM %s
; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=large | FileCheck --check-prefix=CHECK --check-prefix=LARGE %s
@foo = dso_local global i32 42
@fooa = dso_local alias i32, ptr @foo
@foo2 = dso_local global i64 42
@foo2a = dso_local alias i64, ptr @foo2
; CHECK-LABEL: bar:
define dso_local i32 @bar() {
; MEDIUM: addis 3, 2, fooa@toc@ha
; LARGE: addis 3, 2, .L[[L0:.*]]@toc@ha
%a = load i32, ptr @fooa
ret i32 %a
}
; CHECK-LABEL: bar2:
define i64 @bar2() {
; MEDIUM: addis 3, 2, foo2a@toc@ha
; MEDIUM: addi 3, 3, foo2a@toc@l
; LARGE: addis 3, 2, .L[[L1:.*]]@toc@ha
%a = load i64, ptr @foo2a
ret i64 %a
}
; LARGE: .L[[L0]]:
; LARGE-NEXT: .tc fooa[TC],fooa
; LARGE: .L[[L1]]:
; LARGE-NEXT: .tc foo2a[TC],foo2a