llvm-project/llvm/test/CodeGen/PowerPC/basic-toc-data-local-linkage.ll
Zaara Syeda a03a6e9964
[AIX] [XCOFF] Add support for common and local common symbols in the TOC (#79530)
This patch adds support for common and local symbols in the TOC for AIX.
Note that we need to update isVirtualSection so as a common symbol in
TOC will have the symbol type XTY_CM and will be initialized when placed
in the TOC so sections with this type are no longer virtual.

---------

Co-authored-by: Zaara Syeda <syzaara@ca.ibm.com>
2024-01-31 16:34:21 -05:00

19 lines
481 B
LLVM

; RUN: llc -mtriple powerpc-ibm-aix-xcoff -verify-machineinstrs \
; RUN: < %s 2>&1 | FileCheck %s
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -verify-machineinstrs \
; RUN: < %s 2>&1 | FileCheck %s
@ilocal = internal global i32 0, align 4 #0
define dso_local i32 @read_i32_local_linkage() {
entry:
%0 = load i32, ptr @ilocal, align 4
ret i32 %0
}
attributes #0 = { "toc-data" }
; CHECK: .toc
; CHECK-NEXT: .csect ilocal[TD],2
; CHECK-NEXT: .space 4