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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|liuhongt at gcc dot gnu.org        |rguenth at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Most definitely

(_3)) 1 times scalar_stmt costs 12 in body
((_1)) 1 times scalar_stmt costs 12 in body

vs.

((_1)) 1 times vector_stmt costs 12 in body

is not appropriately honoring the zero-cost, giving the vector code an
advantage.

Otherwise it wouldn't be profitable:

t.f90:4:25: note: Cost model analysis for whole subgraph:
  Vector cost: 36
  Scalar cost: 36
t.f90:4:25: note: Basic block will be vectorized using SLP

Reply via email to