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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 50127
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50127&action=edit
crude hack

So this is a crude attempt at doing this entirely in the BB vect costing
routine by using the stored stmt_info to nail the vectorized stmts place
("somewhat" unreliable for invariants).  The idea to further simplify things is
that we
have to consider zero trip loops as well which means individual loop body
(excluding contained loop bodies) parts should be profitable.  That makes
sorting after the owning loop possible and doing separate costing on that
portions.

(of course we know some bodies will be at least executed once or have a
constant niter amount ... well)

The chance is of course that any preheader code will now disable "BB loop"
vectorization.

As said, it's a crude hack.  But maybe it's good enough to polish it?

Reply via email to