[clang] [llvm] [SystemZ] Add i128 support for z/OS XPLINK64 ABI (PR #223026)

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 17 07:02:33 PDT 2026


================
@@ -2608,9 +2611,12 @@ bool SystemZTargetLowering::CanLowerReturn(
     const Type *RetTy) const {
   // Special case that we cannot easily detect in RetCC_SystemZ since
   // i128 may not be a legal type.
-  for (auto &Out : Outs)
-    if (Out.ArgVT.isScalarInteger() && Out.ArgVT.getSizeInBits() > 64)
-      return false;
+  // On z/OS we need to skip the convention of passing the return value on
+  // the stack used on zLinux.
+  if (Subtarget.isTargetLinux())
----------------
uweigand wrote:

I'd prefer to use `!Subtarget.isTargetzOS()` instead of adding this new predicate.

https://github.com/llvm/llvm-project/pull/223026


More information about the cfe-commits mailing list