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

--- Comment #11 from Dimitar Dimitrov <dimitar at gcc dot gnu.org> ---
(In reply to [email protected] from comment #8)
> On Sun, 7 Dec 2025, gjl at gcc dot gnu.org wrote:
...
> If there's specific patterns problematic on AVR and I see a patch
> that's adding sth like
> 
>   && known_le (GET_MODE_SIZE (TYPE_MODE (type)),
>                GET_MODE_SIZE (word_mode))
> 
> I'd be inclined to approve it (hint!), at least it would be a good
> starting point for discussions.  We could abstract this to a target
> hook with the above being the default implementation.

This should be gated by a target hook. Otherwise this condition would
cause a performance regression for PRU target, which has:

  #define UNITS_PER_WORD 1
  #define INT_TYPE_SIZE 32

PRU has efficient 32-bit ALU, but in GCC is represented as 8-bit machine to
allow sub-word register addressing.

Reply via email to