On Thu, Jun 11, 2020 at 9:04 PM Segher Boessenkool <[email protected]> wrote: > > Hi! > > On Thu, Jun 11, 2020 at 01:49:57PM +0200, Martin Liška wrote: > > Since stmt_vec_info is not generated for debug info statements, these needs > > to > > be skipped in rs6000_density_test. > > > PR target/95627 > > * config/rs6000/rs6000.c (rs6000_density_test): Skip debug > > statements. > > > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c > > index 0bbd06ad1de..00daf979856 100644 > > --- a/gcc/config/rs6000/rs6000.c > > +++ b/gcc/config/rs6000/rs6000.c > > @@ -4987,6 +4987,9 @@ rs6000_density_test (rs6000_cost_data *data) > > for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) > > { > > gimple *stmt = gsi_stmt (gsi); > > + if (is_gimple_debug (stmt)) > > + continue; > > Yes, this is fine for trunk (with the indent fixed), thanks! > > Or you could use gsi_next_nondebug? That is a bit neater. Either way > is okay.
Also need to adjust gsi_start_bb then, of course. > > Thanks! > > > Segher
