On Sun, Dec 1, 2024 at 11:15 PM Jeff Law <jeffreya...@gmail.com> wrote: > > > > On 11/27/24 3:34 PM, H.J. Lu wrote: > > On Thu, Nov 21, 2024, 2:02 PM H.J. Lu <hjl.to...@gmail.com > > <mailto:hjl.to...@gmail.com>> wrote: > > > > Promote integer arguments smaller than int if TARGET_PROMOTE_PROTOTYPES > > returns true. > > > > PR middle-end/14907 > > * calls.c (initialize_argument_information): Promote small > > integer > > arguments if TARGET_PROMOTE_PROTOTYPES returns true. > This doesn't look right. Promotions are primarily driven by the target > files, in particular TARGET_PROMOTE_FUNCTION_MODE. > > PROMOTE_PROTOTYPES is more of a language front-end hook and it doesn't > seem appropriate to be testing it in calls.cc.
It's a misguided hook that when applied in a subset of frontends ends up generating wrong code when doing multi-language LTO. I requested moving it's handling to RTL expansion where we can apply it consistently. This particular patch looks OK to me (but as said elsewhere I'm not very familiar with calls.cc and it's peculiarities). Richard. > > Jeff