------- Comment #13 from jakub at gcc dot gnu dot org 2008-12-16 15:05 ------- Not doing this optimization if added_clobbers_hard_reg_p would basically kill it on i386/x86_64 except for constant values, all the shifts clobber hard registers. But typically flags register is only live for very short range between compare and (usually the next insn) following conditional jump. Given how many insns clobber the flags it is very rare to have the setter and user many insns appart.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37922