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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-12-20
            Summary|Regression of code          |[14/15 Regression] SLP cost
                   |generation due to an overly |model for ior/add reduction
                   |eager vectorization attempt |should be improved
           Keywords|                            |missed-optimization
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
/app/example.c:10:12: note: Cost model analysis for part in loop 0:
  Vector cost: 24
  Scalar cost: 28


If you replace | with +, it still gets vectorized.

And using aarch64 with addition, the cost model for aarch64 is better and
rejects the vectorization:
/app/example.cpp:6:12: note: Cost model analysis for part in loop 0:
  Vector cost: 6
  Scalar cost: 3


I suspect this is a dup of another cost model issue too.

Reply via email to