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

--- Comment #15 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
In my opinion, as I mentioned before, costing for uncounted loops should be
based on the single iteration cost of the vector loop vs the scalar, and this
value for profitability should be used to version the loop.

What we want is a runtime threshold for profitability, similar to how we
version normal loops. This feels more correct to me and it would allow targets
to adjust this scale. This is similar to what we do today already for known
iters loops.

And vectorizeration statically rejected when the vector costs / VF > scalar
costs. ie the vector costs will never beat scalar per iteration.

Reply via email to