<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/109654>109654</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Objective-C] Assertion "Narrow integer argument must have a valid extension type." failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JonPsson1
</td>
</tr>
</table>
<pre>
With the recent strengthening of the handling of extensions of narrow integer arguments (commit 1412022), it is now possible to detect cases of missing argument extensions, although there are still some issues that keeps this disabled by default. One of these test failures is
clang/test/CodeGenObjC/blocks-ivar-debug.m -v
What this means is that there is a narrow (<=32 bit) integer argument that is neither sign or zero extended, and is also not marked as noext, which should be done for "struct-in-reg". So this may or may not be a "bug" (missing sign/zero extension), or it could be an argument that should be marked as noext. See https://llvm.org/docs/LangRef.html#parameter-attributes.
This can be reproduced with:
clang -cc1 -internal-isystem ~/llvm-project/build/lib/clang/20/include ~/llvm-project/clang/test/CodeGenObjC/blocks-ivar-debug.m -fblocks -S -o /dev/null -triple s390x--linux-gnu -mllvm -argext-abi-check
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:9861: void llvm::SystemZTargetLowering::verifyNarrowIntegerArgs(const llvm::SmallVectorImpl<llvm::ISD::OutputArg>&, bool) const: Assertion `(VT != MVT::i32 || (Flags.isSExt() || Flags.isZExt() || Flags.isNoExt())) && "Narrow integer argument must have a valid extension type."' failed.
CC:ing some people that seem to be familiar with ObjC: @kazutakahirata @danix800 , thanks.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVU9v47gP_TTKhbDhyHGTHHLIL5n80MXsdLEpZoC5SRZjayJLhkSn7Rz2sy9oJ9POnz0sFigaWZQeH8lHSqVkG4-4EdX_RLWfqYHaEDe_Bf9HSsHPZzqYl80nSy1QixCxRk-QKKJvqEVvfQPhNNpa5Y27fuMzoU82-MRfXsUYnsB6w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