https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112877
Bug ID: 112877 Summary: TARGET_PROMOTE_PROTOTYPES is not honored consistently, should maybe not apply to builtins Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Currently only the C, C++ and Ada frontends honor (maybe partly) TARGET_PROMOTE_PROTOTYPES so this is at most an optimization feature, in particular it doesn't look like the target can guarantee ABI constraints with this (zero/sign extending arguments at callers). TARGET_PROMOTE_PROTOTYPES should be (and is AFAICS) reflected into DECL_ARG_TYPE. combine is the only thing lookig at DECL_ARG_TYPE. The iq2000, microblaze and PA targets look at DECL_ARG_TYPE (didn't look at what). In particular the vectorizer is pessimized by the promotion when vectorizing builtins working on < int arguments and for OMP SIMD function vectorization. Targets might get more control when the hook were passed a function decl rather than only a function type. But since nothing on the GIMPLE level cares about DECL_ARG_TYPE it might be possible to reflect TARGET_PROMOTE_PROTOTYPES only during RTL expansion.