[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.
jvg1981 at aim dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 25 02:17:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list