http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56200
Yuri Rumyantsev <ysrumyan at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ysrumyan at gmail dot com --- Comment #7 from Yuri Rumyantsev <ysrumyan at gmail dot com> 2013-02-06 14:04:36 UTC --- Here is my 2 cents. I assume that we must not put 2 branches to the same target into the same fetch line since x86 branch predictor uses IP without last 4 bits as hash function. It means that 2 consequtive branches to the same targets have the same prediction history, i.e. they both either taken or not-taken but we can suppose that for if (cond1 || cond2) goto L; one of condition can be true with more than 50% probability. If we are at the 2nd branch (i.e. 1st branch was not-taken) we must assume that it will be taken and it must be put to another fetch line.