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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |13.0
             Target|                            |aarch64
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-06-01

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's already some code in if-conversion to deal with the vectorizers
restrictions with respect to how reductions have to appear.  Basically the
vectorizer currently does not accept

  for (..)
    a = b < 10. ? a + b : a - b;

because there are two uses of 'a' here.  Re-writing this to

  for (..)
    a = a + (b < 10. ? b : -b)

would indeed work.  See is_cond_scalar_reduction for the existing special
casing.

Reply via email to