public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/112877] New: TARGET_PROMOTE_PROTOTYPES is not honored consistently, should maybe not apply to builtins
@ 2023-12-06  9:26 rguenth at gcc dot gnu.org
  2023-12-09 20:18 ` [Bug middle-end/112877] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-06  9:26 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug middle-end/112877] TARGET_PROMOTE_PROTOTYPES is not honored consistently, should maybe not apply to builtins
  2023-12-06  9:26 [Bug middle-end/112877] New: TARGET_PROMOTE_PROTOTYPES is not honored consistently, should maybe not apply to builtins rguenth at gcc dot gnu.org
@ 2023-12-09 20:18 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-09 20:18 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-12-09

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
. See PR 48274 also.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-09 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06  9:26 [Bug middle-end/112877] New: TARGET_PROMOTE_PROTOTYPES is not honored consistently, should maybe not apply to builtins rguenth at gcc dot gnu.org
2023-12-09 20:18 ` [Bug middle-end/112877] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).