https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64753
--- Comment #1 from Rasmus Villemoes <rv at rasmusvillemoes dot dk> --- FWIW, I wrote a stupid script looking for the pattern <test/cmp instruction> <(conditional) jump to abcd> ... abcd: <same test/cmp instruction> Compiling a defconfig linux kernel with gcc 4.7 gives 201 instances, 5.0 gives 252. The second test/cmp may not be redundant in all cases, but at least the jump target could be adjusted to the instruction following abcd. I filtered out cases where the jump itself was a jump target (so the only path to it is through the preceding test/cmp), though that didn't actually remove anything.