https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101301

--- Comment #9 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #8)
> (In reply to Segher Boessenkool from comment #7)
>  
> > Yeah :-)  Of course in your testing the nine named cases have the same
> > probability,
> > which is not very true in practice (but is there any better guess possible),
> > and
> > the "default" case has that same probability for GCC (is there a better
> > estimate
> > for that, maybe?)
> 
> I think that we should leave something to do for the hardware branch
> predictors.  Any pattern should lead to better predictions. The test
> case is rather brutal because it is random.

Heh.  My question is if we would get better code if we assumed the default case
is more likely than the other cases, in general, on actual code "in the wild".
There is bound to be some literature about that, hrm...

> > (I expect there just is some typo or thinko somewhere in the pass, fwiw :-) 
> > )
> 
> As I have demonstrated above, such a thinko is rather easy to make :-)

Ha :-)  Too bad we can only warn "invalid sum of incoming frequencies", it
still
happens too often (read: at all) to actually error on it...  that would perhaps
grab people's attention :-)

Reply via email to