[llvm] [SystemZ] XPLINK64: emit narrow sign/zero-extend instructions for sub-i32 formal args (PR #206833)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 06:37:09 PDT 2026
================
@@ -0,0 +1,251 @@
+; Test that sub-64-bit integer formal arguments and small struct formal
+; arguments are correctly sign/zero-extended by the callee in the z/OS
+; XPLINK64 calling convention.
+;
+; The XPLINK64 ABI does not require the caller to have extended the upper bits
+; of a GPR for named (non-variadic) integer arguments. The callee therefore
+; must perform its own extension when it needs the full 64-bit value.
----------------
uweigand wrote:
The comment isn't quite accurate - if the ABI really did not require extension, we simply could not perform it. But we tried that and it doesn't work. So we should rather say something along the lines of the comment in the code above: extension should normally be performed, but to accommodate some pre-existing compilers we do not rely on that fact in our generated code.
https://github.com/llvm/llvm-project/pull/206833
More information about the llvm-commits
mailing list