On Mon, Sep 06, 2021 at 07:15:41PM +0800, Hongtao Liu wrote: > > So what about finish_options then? > > default_options_optimization has only a single caller that then calls > > read_cmdline_options and then finish_options. > in finish_options > (gdb) p opts_set->x_flag_tree_loop_vectorize > $37 = 1 > with -O2 -ftree-loop-vectorize, > > but > 1000 if (opts->x_dump_base_name > (gdb) p opts_set->x_flag_tree_loop_vectorize > $38 = 0 > for -O2 -ftree-vectorize??? > > Any magic for ftree-vectorize w/ EnabledBy???
I guess a way to get this working would be: ; Alias to enable both -ftree-loop-vectorize and -ftree-slp-vectorize. ftree-vectorize -Common Optimization +Common Var(flag_tree_vectorize) Optimization Enable vectorization on trees. and then you can test both opts_set->x_flag_tree_vectorize and opts_set->x_flag_tree_loop_vectorize Jakub