This brings us in line with GCC and MSVC behaviour, and saves on code size.
We were already not extending i1 return values to on x86_64 after .
The ABI docs are unclear about this situation. The new i386 psABI  clearly states (Table 2.4, page 14) that i1, i8, and i16 return values do not need to be extended beyond 8 bits (GCC and MSVC do extend 16-bit values though, so I'm holding off on that). The old i386 psABI  does not mention this. I can't find mention of this in the x86_64 ABI , but there is a proposal on  that matches the behaviour in this patch.
Please let me know what you think.