https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112406
--- Comment #9 from Robin Dapp <rdapp at gcc dot gnu.org> --- I believe the problem is that in if (vectype) vector_type = vectype; else if (VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (op)) && VECTOR_BOOLEAN_TYPE_P (stmt_vectype)) vector_type = truth_type_for (stmt_vectype); else vector_type = get_vectype_for_scalar_type (loop_vinfo, TREE_TYPE (op)); we don't expect a COND_OP and wrongly deduce the vector type from the scalar type (because !VECTOR_BOOLEAN_TYPE_P (stmt_vectype)). Maybe we need to check whether we look at the mask operand of a conditional operation and use the statement's vectype in that case.