https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122841
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2025-11-25
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
For example in vectorizable_conversion there's no need for two-stage conversion
from, say, 'int' to 'double' for invariant 'int' if the target can only
perform, say, V4SI->V2DI->V2DF, instead vectorizable_conversion could
ask for a V2DI invaraint to be created. And even creating a V4SI invariant
should not require the loop to be unrolled, instead only the unpack_lo
part would need to be code generated, or, alternatively creating a V2SI
invariant.
Chance is, of course, that vectorizable_* fails to create a supported vector
type for invariants when we fix the VF on the lower side, but all those
cases should be fixable. So the simplest fix is to adjust the
get_vectype_for_scalar_types calls done to honor the current VF and fail
when no vector type suitable is available.
A lower VF is desirable because it eases register pressure (easily compensated
by target unrolling), it allows for more BB vectorization without "unrolling"
and it allows for smaller tripcount loops to be vectorized.