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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 28 Apr 2025, rdapp at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119577
> 
> --- Comment #3 from Robin Dapp <rdapp at gcc dot gnu.org> ---
> I manage to have a quick look at the code now.  It looks like we force live
> every induction and build slp instances for the IV increments.
> 
> I don't think adjusting the actual IV creation in vectorizable_induction would
> be too involved, at least for the length-controlled case, but I wonder what to
> do with the increment.
> 
> Right now we just vectorize it with the fitting vector type (this limits VF 
> for
> some of the examples I'm looking at BTW where we could vectorize at a higher 
> VF
> without the vectorized int induction).
> 
> Is there precedent of how to handle such a situation?  I.e. can we keep track
> of the affected stmts in the slp isntance and then "vectorize" with a scalar
> type?  Or would we need to circumvent that altogether and adjust the existing
> scalar IV?  Or rather create a new scalar IV and re-wire the uses?

There is precedent of re-using a scalar IV with the
in-order (fold-left) reduction vectorization which keeps the scalar
reduction IV.

Reply via email to