https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119851
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2025-04-17 Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The intent is to have =cheap the default with -O2 -ftree-vectorize: /* Use -fvect-cost-model=cheap instead of -fvect-cost-mode=very-cheap by default with explicit -ftree-{loop,slp}-vectorize. */ if (opts->x_optimize == 2 && (opts_set->x_flag_tree_loop_vectorize || opts_set->x_flag_tree_vectorize)) SET_OPTION_IF_UNSET (opts, opts_set, flag_vect_cost_model, VECT_COST_MODEL_CHEAP); And there is -ftree-{loop,slp}-vectorize reported as enabled, correctly, just not the combined -ftree-vectorize likely since we have { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_ftree_loop_vectorize, NULL, 1 }, { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_ftree_slp_vectorize, NULL, 1 }, and that makes -ftree-vectorize not explicitly enabled. > ./xgcc -B. t.c -O2 -S -Q --help=common | grep vect -Wvector-operation-performance [disabled] -ftree-loop-vectorize [enabled] -ftree-slp-vectorize [enabled] -ftree-vect-loop-version [ignored] -ftree-vectorize [disabled] -ftree-vectorizer-verbose= -fvect-cost-model -fvect-cost-model=dynamic -fvect-cost-model=[unlimited|dynamic|cheap|very-cheap] very-cheap