On 29/10/2024 13:45, Richard Biener wrote:
> On Tue, 29 Oct 2024, Richard Biener wrote:
> 
> > On Mon, 28 Oct 2024, Alex Coplan wrote:
> > 
> > > Currently we only cost gconds for the vector loop while we omit costing
> > > them when analyzing the scalar loop; this unfairly penalizes the vector
> > > loop in the case of loops with early exits.
> > > 
> > > This (together with the previous patches) enables us to vectorize
> > > std::find with 64-bit element sizes.
> > 
> > OK.
> 
> Ah, wait - but we're now costing the scalar IV gcond but we're not
> costing the vector (scalar) IV gcond.  So you want to exempt the
> main IV gcond here.

Hmm, don't we already ignore the main IV since it should be
!STMT_VINFO_RELEVANT_P?

Sorry for the slow reply.

Alex

> 
> Richard.
> 
> > Thanks,
> > Richard.
> > 
> > > gcc/ChangeLog:
> > > 
> > >   * tree-vect-loop.cc (vect_compute_single_scalar_iteration_cost):
> > >   Don't skip over gconds.
> > > ---
> > >  gcc/tree-vect-loop.cc | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > 
> > 
> > 
> 
> -- 
> Richard Biener <rguent...@suse.de>
> SUSE Software Solutions Germany GmbH,
> Frankenstrasse 146, 90461 Nuernberg, Germany;
> GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to