https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68595
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW CC| |alan.hayward at arm dot com Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- (gdb) p debug_tree (elt) <integer_cst 0x7ffff6a241f8 type <boolean_type 0x7ffff69d0498> constant -2> (gdb) p debug_generic_expr (exp) { 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } comes from BIT_NOT_EXPR on { -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } from simplifying mask__25.20_271 = ~{ -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; where the vectorizer generated mask__21.18_69 = vect_vec_iv_.17_66 != vect_cst__68; _21 = c.2_33 != 0; mask__23.19_72 = mask__21.18_69 | vect_cst__71; and unrolling exposes a lot of constants to go forward. The vector_cst looks suspicious: _44 = b.3_32 != 0; _70 = (<unnamed type>) _44; vect_cst__71 = {_70, _70, _70, _70, _70, _70, _70, _70, _70, _70, _70, _70, _70, _70, _70, _70}; because the vector boolean result is clearly _not_ a scalar comparison result just casted but it needs to cater for true to become -1.