https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79284
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, the problem seems to be that useless_type_conversion_p considers conversions between BOOLEAN_TYPE and INTEGER_TYPE with precision 1 as useless, but the vectorizer handles BOOLEAN_TYPE and INTEGER_TYPE with precision 1 very differently. When some propagation propagates e.g. INTEGER_TYPE with precision 1 into one operand of a stmt and the other operand is still BOOLEAN_TYPE, we'll use VECTOR_BOOLEAN_TYPE_P vectype for one of the operands, but a V*QI mode vectype for the other operand and obviously very bad things happen. So, shall we change all the places in the vectorizer that check for BOOLEAN_TYPE to also allow INTEGRAL_TYPE_P that is TYPE_PRECISION == 1 and TYPE_UNSIGNED? grep -w BOOLEAN_TYPE tree-vect-[lps]*.c tree-vect-loop.c: if (TREE_CODE (scalar_type) == BOOLEAN_TYPE tree-vect-loop.c: != BOOLEAN_TYPE) tree-vect-loop.c: && TREE_CODE (TREE_TYPE (gimple_assign_rhs1 (stmt))) != BOOLEAN_TYPE) tree-vect-patterns.c: && TREE_CODE (TREE_TYPE (rhs1)) != BOOLEAN_TYPE) tree-vect-patterns.c: && TREE_CODE (TREE_TYPE (var)) != BOOLEAN_TYPE) tree-vect-patterns.c: if (TREE_CODE (TREE_TYPE (rhs1)) == BOOLEAN_TYPE) tree-vect-patterns.c: && TREE_CODE (TREE_TYPE (var)) != BOOLEAN_TYPE) tree-vect-patterns.c: if (TREE_CODE (TREE_TYPE (lhs)) != BOOLEAN_TYPE) tree-vect-slp.c: if (TREE_CODE (TREE_TYPE (op)) == BOOLEAN_TYPE tree-vect-stmts.c: else if (TREE_CODE (TREE_TYPE (op)) == BOOLEAN_TYPE tree-vect-stmts.c: if (TREE_CODE (TREE_TYPE (mask)) != BOOLEAN_TYPE) tree-vect-stmts.c: if (TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE) tree-vect-stmts.c: if (TREE_CODE (TREE_TYPE (scalar_dest)) != BOOLEAN_TYPE) tree-vect-stmts.c: && TREE_CODE (TREE_TYPE (cond)) == BOOLEAN_TYPE) tree-vect-stmts.c: if (TREE_CODE (scalar_type) == BOOLEAN_TYPE)