[PATCH] D122963: [X86] Extend the integer parameter if the function isn't local linked

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 05:01:36 PDT 2022


>
> Sometimes ignoring the attribute and performing zeroext ourselves is a
> workaround for ABI mismatch.
>

Yes, that's precisely the point of this change -- as discussed already!
Clang has been putting zeroext on all C functions taking 8/16 bit types,
incorrectly, for it's entire existence.

And, thus, now we must extend redundantly on both sides of the call, for
external functions.

We must extend in the caller to support calling old-clang code (which
didn't extend in callee). We must extend in the callee to support being
called by non-clang compilers (which don't always extend in the caller).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220407/18ccf4c7/attachment.html>


More information about the llvm-commits mailing list