llvm-project/llvm/test/CodeGen/SystemZ/zos-target-flags.ll
Kai Nacke 66ca3f1367
[SystemZ] Serialize ada entry flags (#169395)
Adding support for serializing the ada entry flags helps with mir based
test cases. Without this change, the flags are simple displayed as being
"unkmown".
2025-11-27 08:14:43 -05:00

18 lines
680 B
LLVM

; RUN: llc -mtriple=s390x-ibm-zos -stop-after=systemz-isel --simplify-mir < %s | FileCheck %s
declare i64 @calc(i64 noundef, ptr noundef)
declare i64 @morework(i64 noundef)
@i = external local_unnamed_addr global i64, align 8
define i64 @work() {
entry:
; CHECK: %{{.*}}:addr64bit = ADA_ENTRY_VALUE target-flags(systemz-ada-datasymboladdr) @i,
; CHECK: %{{.*}}:addr64bit = ADA_ENTRY_VALUE target-flags(systemz-ada-directfuncdesc) @calc,
; CHECK: %{{.*}}:addr64bit = ADA_ENTRY_VALUE target-flags(systemz-ada-indirectfuncdesc) @morework,
%0 = load i64, ptr @i, align 8
%call = tail call i64 @calc(i64 noundef %0, ptr noundef nonnull @morework) #2
ret i64 %call
}