nikic wrote:

> Does i2~i7 follow the same rule?

Not sure if I understand what you're asking here, but the psABI specifies the 
`_BitInt` is never extended, including for types < 8 bit. `bool` and `unsigned 
_BitInt(1)` do not use the same psABI. The former zero-extends to 8 bits, the 
latter has all high bits unspecified.

> Does this change i32/i64 type or not? Is it limited to _BitInt(N) where N < 
> 32?

The latter. Types >= 32 bit never used zeroext/signext.

> Sounds like if we exclude _BitInt type in the patch, it can be an NFC change?

Yes. I can split this into two changes if preferred. I thought doing these 
together is cleaner, as the current _BitInt behavior is just a consequence of 
different treatment between legal and illegal types in the backend.

> What about when passing the result immediately as an argument?

As we currently (incorrectly require extension for arguments, I'd expect 
passing a return value directly to an argument will insert an extension (for 
types < 32 bit). Though this is not new, except for the `_BitInt` case.

https://github.com/llvm/llvm-project/pull/232729
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to