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

--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
Cost-wise we have

t.ii:14:5: note: Cost model analysis for part in loop 1:
  Vector cost: 68
  Scalar cost: 136
t.ii:14:5: note: Cost model analysis for whole subgraph:
  Vector cost: 116
  Scalar cost: 184

and the 'loop 0' part (delayed, covered with whole subgraph costing only) is
equal between vector/scalar, with vector having fewer stores but two vector
constant loads (we do not correctly cost scalar FP constant materialization).

There's not much obvious leverage here besides attempting to pessimize all
not-full-vector vectorization which I'm not sure is a good idea.  Instead
it might be reasonable to eye this from the old idea to pessimize N lane
vectorization on a N x superscalar uarch, where for N == 2 code size
might be comparable (with VEX encoding), esp. for _integer_ code.  For
this testcase scalar code is 3 bytes smaller (so overall similar) with
traditional encoding and 19 bytes bigger with VEX encoding, so for FP
we'd have to factor in code size win due to 2-lane vectorization eventually
as well.

Reply via email to