[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 23 16:27:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573
--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
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.
More information about the Gcc-bugs
mailing list