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

--- Comment #11 from Joshua Green <jvg1981 at aim dot com> ---
(In reply to Segher Boessenkool from comment #10)
> GCC thinks bar2 will be executed more often that bar1; the code
> it generates is perfectly fine for that.
> 
> If you think GCC's heuristics for branch prediction are no good,
> could use some improvement, you'll have to come up with more
> evidence than just a single artificial testcase.  Sorry.  These
> things were tuned on real code.

If gcc's heuristic is indeed optimal when tested over a reasonable sample of
real code, then I withdraw my objection.

Reply via email to