https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127913
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #1)
> Confirmed. There are a few things. first we don't have a pass which shrinks
> types.
A promotion/demotion pass has been discussed some years ago but nothing has
materialized.
It can be useful to convert IL to use narrower types when we don't care about
the more significant bits and the FEs are already performing this optimization
to some extent (though, it can also pessimize stuff if we convert wider signed
into narrower unsigned and get through that wrapping behavior). But then for
vectorizer purposes it can be beneficial if a loop handles everything in a
single type precision instead of many different, and for isel it can be also
useful to promote types depending on target preferences.