[Bug tree-optimization/105793] Missed vectorisation with conditional-select inside loop
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 1 12:09:01 GMT 2022
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.
More information about the Gcc-bugs
mailing list