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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Michael Matz from comment #9)
> (In reply to Richard Biener from comment #8)
> > 
> > I'm out of ideas suitable for GCC 9 (besides reverting the patch, reverting
> > to bogus state).
> 
> Either that or some hack (e.g. artificially avoiding vectorization if
> runtime checks are necessary and the loop-nest isn't a box but a pyramid). 
> Whatever
> we do it's better to release GCC with internal bogus state than to release
> GCC with a known 10% performance regression (you could revert only on the
> release branch so that the regression stays in trunk).

So for example we cost 18 stmts in the scalar loop body and
32 stmts in the vector loop body.  That's unfortunately still a savings
of 4 compared to a vectorization-factor unrolled scalar body.

The ratio of vector builds from scalars to other stmts is 6 : 26, if you'd
factor in vector decompositions as well it's 8 : 24.

Given we've had issues with too eagerly doing strided loads / stores in other
cases I'd say a heuristic using that would make more sense than one on
runtime alias checks and/or loop nest structure.

Btw, I don't think avoding 10% regression in an obsolete benchmark
(SPEC 2006) is more important than not feeding garbage into the cost
model... (we've never assesed positive results from that change).

Reply via email to