https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106476
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > I think EXTRACT_LAST_REDUCTION cannot simply do > > /* Instead of doing ~x ? y : z do x ? z : y. */ > vec_compare = new_temp; > std::swap (vec_then_clause, vec_else_clause); > > So either the fix could be to not support bitop2 == BIT_NOT_EXPR for > EXTRACT_LAST_REDUCTION or we have to perform the BIT_NOT_EXPR as > vector operation. > > Richard? Agreed. This case seems to be specific to EQ_EXPR on booleans, and I'm not sure why we can't just emit an EQ_EXPR for that case. Anything else would lead to redundant ops for EXTRACT_LAST_REDUCTION. There again, having (predicate, predicate → predicate) comparisons for EQ_EXPR might be a weird special case, and might be similar to having things like NAND and NOR (which we deliberately don't have). So maybe emitting the separate NOT_EXPR is better after all.