On Wed, Apr 10, 2013 at 11:44:18AM +0200, Marek Polacek wrote: > Ping. > > On Thu, Apr 04, 2013 at 04:01:09PM +0200, Marek Polacek wrote: > > This fixes an ICE in case we use weirdo --param value for > > PARAM_ALIGN_THRESHOLD. The patch is by Andrew; I added CL, testcase > > and tested. > > > > Bootstrapped/regtested on x86_64-linux, ok for trunk? And what about other > > branches? > > > > 2013-04-04 Marek Polacek <pola...@redhat.com> > > Andrew Pinski <apin...@cavium.com> > > > > PR tree-optimization/48184 > > * final.c (compute_alignments): Set threshold to 0 > > if PARAM_ALIGN_THRESHOLD is 0. > > > > * gcc.dg/pr48184.c: New test.
Shouldn't this be again solved instead by bumping minimum for the param to 1 from 0? Because, the smaller the param is, the bigger freq_threshold is, so if for the smallest param we suddenly set freq_threshold to 0, it isn't consistent. > > --- gcc/final.c.mp 2013-04-04 14:09:04.626020852 +0200 > > +++ gcc/final.c 2013-04-04 14:09:05.672024174 +0200 > > @@ -701,7 +701,10 @@ compute_alignments (void) > > FOR_EACH_BB (bb) > > if (bb->frequency > freq_max) > > freq_max = bb->frequency; > > - freq_threshold = freq_max / PARAM_VALUE (PARAM_ALIGN_THRESHOLD); > > + if (PARAM_VALUE (PARAM_ALIGN_THRESHOLD) == 0) > > + freq_threshold = 0; > > + else > > + freq_threshold = freq_max / PARAM_VALUE (PARAM_ALIGN_THRESHOLD); > > > > if (dump_file) > > fprintf(dump_file, "freq_max: %i\n",freq_max); Jakub