https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108357

--- Comment #18 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #17)
> Isn't this the same issue as seen in another bug, most targets defining
> TARGET_PROMOTE_PROTOTYPES to hook_bool_const_tree_true but loongarch not?
> That will cause those conversions to be missed.

Looks like we should define it, as our psABI says:

In most cases, the unsigned integer data types are zero-extended when stored in
general-purpose register, and the signed integer data types are sign-extended.
However, in the LP64D ABI, unsigned 32-bit types, such as unsigned int, are
stored in general-purpose registers as proper sign extensions of their 32-bit
values.

IIUC it matches the semantics of TARGET_PROMOTE_PROTOTYPES.

Reply via email to