https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102788
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. ... mask__43.21_62 = vect_cst__60 != vect_cst__61; _43 = var_12.0_1 != 0; _3 = (long long unsigned int) _43; vect_patt_34.22_63 = VIEW_CONVERT_EXPR<vector(4) unsigned char>(mask__43.21_62); _26 = (unsigned char) _3; Somehow the vectorizer missed the conversion but has the conversion there. /app/example.cpp:19:23: note: add new stmt: mask__43.21_62 = vect_cst__60 != vect_cst__61; /app/example.cpp:19:23: note: ------>vectorizing statement: _3 = (long long unsigned int) _43; /app/example.cpp:19:23: note: ------>vectorizing statement: patt_34 = (unsigned char) _43; /app/example.cpp:19:23: note: transform statement. /app/example.cpp:19:23: note: vect_is_simple_use: operand var_12.0_1 != 0, type of def: internal /app/example.cpp:19:23: note: vect_is_simple_use: vectype vector(4) <signed-boolean:8> /app/example.cpp:19:23: note: transform assignment. /app/example.cpp:19:23: note: vect_get_vec_defs_for_operand: _43 /app/example.cpp:19:23: note: vect_is_simple_use: operand var_12.0_1 != 0, type of def: internal /app/example.cpp:19:23: note: def_stmt = _43 = var_12.0_1 != 0; /app/example.cpp:19:23: note: add new stmt: vect_patt_34.22_63 = VIEW_CONVERT_EXPR<vector(4) unsigned char>(mask__43.21_62); /app/example.cpp:19:23: note: extracting lane for live stmt _26 = (unsigned char) _3;