[llvm] [SystemZ] Support fp16 vector ABI and basic codegen. (PR #171066)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 06:55:40 PST 2025
================
@@ -0,0 +1,709 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
+; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z16 | FileCheck %s --check-prefix=VECTOR
+;
+; Test passing fp16 vector arguments.
+
+ at Fnptr = external global ptr
+ at Src = external global ptr
+ at Dst = external global ptr
+
+%Ty0 = type <8 x half>
+define void @fun0_arg(%Ty0 %A) {
+; CHECK-LABEL: fun0_arg:
+; CHECK: # %bb.0:
+; CHECK-NEXT: lgh %r0, 166(%r15)
----------------
uweigand wrote:
I didn't do a full review yet, but just as a quick heads-up: this doesn't seem to be the correct ABI here. We said that `<8 x half>` should be handled like other vector types, which means for the pre-z13 ABI passed by reference. The code here however appears to treat it like passing 8 separate `half` values (first four in FPRs, rest in separate argument stack slots).
https://github.com/llvm/llvm-project/pull/171066
More information about the llvm-commits
mailing list