https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101639
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |53947 Last reconfirmed| |2021-07-27 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- vectorizable_reduction fails the 6692 scalar_dest = gimple_assign_lhs (stmt); 6693 scalar_type = TREE_TYPE (scalar_dest); 6694 if (!POINTER_TYPE_P (scalar_type) && !INTEGRAL_TYPE_P (scalar_type) 6695 && !SCALAR_FLOAT_TYPE_P (scalar_type)) 6696 return false; 6697 6698 /* Do not try to vectorize bit-precision reductions. */ 6699 if (!type_has_mode_precision_p (scalar_type)) 6700 return false; check. I guess we could relax that for BIT_*_EXPR reductions. But then we run into t5.c:4:21: note: vect_is_simple_use: vectype vector(16) unsigned char t5.c:4:21: missed: mixed mask and nonmask vector types t5.c:1:6: missed: not vectorized: relevant stmt not supported: _7 = _4 & r_14; t5.c:4:21: missed: bad operation or unsupported loop bound. I guess that's mainly a fault of missed bool pattern handling of the reduction - we fail to make p[i] != 0 available as non-boolean vector. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations