On Tue, 24 Jun 2025, Martin Jambor wrote: > Hi, > > On Fri, Oct 25 2024, Richard Biener wrote: > > The following places a few strathegic asserts so we do not end up > > with COND_EXPRs with a comparison as the first operand during > > vectorization. > > > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > > > These are the asserts I'd like to keep, I will followup with quite > > some dead code removal when this holds. > > > > * tree-vect-slp.cc (vect_get_operand_map): Mark > > COMPARISON_CLASS_P COND_EXPR condition path unreachable. > > * tree-vect-stmts.cc (vect_is_simple_use): Likewise. > > (vectorizable_condition): Assert the COND_EXPR condition isn't > > COMPARISON_CLASS_P. > > --- > > gcc/tree-vect-slp.cc | 2 +- > > gcc/tree-vect-stmts.cc | 8 ++------ > > 2 files changed, 3 insertions(+), 7 deletions(-) > > > > diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc > > index b192328e3eb..2e98a943e06 100644 > > --- a/gcc/tree-vect-slp.cc > > +++ b/gcc/tree-vect-slp.cc > > @@ -549,7 +549,7 @@ vect_get_operand_map (const gimple *stmt, bool > > gather_scatter_p = false, > > { > > if (gimple_assign_rhs_code (assign) == COND_EXPR > > && COMPARISON_CLASS_P (gimple_assign_rhs1 (assign))) > > - return cond_expr_maps[swap]; > > + gcc_unreachable (); > > This seems to have been the only use of cond_expr_maps which we still > have, however. Should the array be removed too?
Looks like so. Odd this didn't cause a bootstrap issue with the unused static ... I've left the actual code above in because it might be a missed optimization now. Richard.