Files
clang-p2996/llvm/test/CodeGen/PowerPC/toc-data-const.ll
Kai Nacke 5403c59c60 [PPC] Opaque pointer migration, part 2.
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, nikic

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

27 lines
566 B
LLVM

; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK
@i1 = external constant i32 #0
@i2 = constant ptr @i1 #0
define i32 @read() {
%1 = load i32, ptr @i1, align 4
ret i32 %1
}
define ptr @retptr() {
ret ptr @i2
}
; CHECK: .read:
; CHECK: la 3, i1[TD](2)
; CHECK: .retptr:
; CHECK: la 3, i2[TD](2)
; CHECK-DAG: .toc
; CHECK: .extern i1[TD]
; CHECK: .csect i2[TD]
attributes #0 = { "toc-data" }