[clang] [llvm] [Clang][ABI][X86] Do not emit zeroext/signext for return values (PR #232729)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 06:02:08 PDT 2026


================
@@ -2838,7 +2850,9 @@ ABIArgInfo X86_64ABIInfo::classifyReturnType(QualType RetTy) const {
 
       if (RetTy->isIntegralOrEnumerationType() &&
           isPromotableIntegerTypeForABI(RetTy))
----------------
nikic wrote:

If you're wondering why this peculiar `isPromotableIntegerTypeForABI()` check is here even though `shouldExtendReturnType()` will also check it, the reason is that Clang uses `iN` for `_BitInt(N)` if N <= 32, but always uses `i64` if `32 < N <= 64`. This seems peculiar and possibly unintended, but I've left it alone for now.

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


More information about the cfe-commits mailing list