Hi! On Wed, Jul 22, 2020 at 09:26:39AM +0800, Kewen.Lin wrote: > +/* For some target specific vectorization cost which can't be handled per > stmt, > + we check the requisite conditions and adjust the vectorization cost > + accordingly if satisfied. One typical example is to model shift cost for > + vector with length by counting number of required lengths under condition > + LOOP_VINFO_FULLY_WITH_LENGTH_P. */ > + > +static void > +adjust_vect_cost (rs6000_cost_data *data) > +{
Maybe call it rs6000_adjust_vect_cost? For consistency, but also it could (in the future) collide with a globalfunction of the same name (it is a very non-specific name). > + /* Each length needs one shift to fill into bits 0-7. */ > + shift_cnt += (num_vectors_m1 + 1); That doesn't need parentheses. > if (cost_data->loop_info) > - rs6000_density_test (cost_data); > + { > + adjust_vect_cost (cost_data); > + rs6000_density_test (cost_data); > + } ^^^ consistency :-) The rs6000 parts are fine for trunk, thanks! Segher