Files
llvm-project/llvm/test/CodeGen/SystemZ/zos-func-alias.ll
Kai Nacke 7fd291b400 [GOFF] Set reference to ADA (#179734)
Function symbols must have a reference to the ADA, because this becomes
the value of the r5 register when the function is called. Simply get the
value from the begin symbol of the section.
2026-03-09 13:31:05 -04:00

18 lines
436 B
LLVM

; Test function aliasing on z/OS
;
; RUN: llc < %s -mtriple=s390x-ibm-zos | FileCheck %s
; CHECK: ENTRY foo
; CHECK-NEXT: foo XATTR LINKAGE(XPLINK),REFERENCE(CODE),PSECT(stdin#S),SCOPE(LIBRARY)
; CHECK-NEXT: foo DS 0H
; CHECK-NEXT: ENTRY foo
; CHECK-NEXT: foo1 XATTR LINKAGE(XPLINK),REFERENCE(CODE),SCOPE(LIBRARY)
; CHECK-NEXT: foo1 DS 0H
@foo1 = hidden alias i32 (i32), ptr @foo
define hidden void @foo() {
entry:
ret void
}