https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115092
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Trying 15 -> 20: 15: {r105:SI=sign_extract(r101:SI,0x1,0);clobber flags:CC;} REG_UNUSED flags:CC 20: flags:CCGC=cmp(r105:SI,0xffffffffffffffff) REG_DEAD r105:SI Successfully matched this instruction: (set (reg:CCZ 17 flags) (compare:CCZ (zero_extract:SI (reg/v:SI 101 [ gD.2776 ]) (const_int 1 [0x1]) (const_int 0 [0])) (const_int 0 [0]))) Successfully matched this instruction: (set (pc) (if_then_else (ne (reg:CCZ 17 flags) (const_int 0 [0])) (label_ref 25) (pc))) allowing combination of insns 15 and 20 original costs 4 + 4 = 20 replacement cost 16 deferring deletion of insn with uid = 15. modifying other_insn 21: pc={(flags:CCZ!=0)?L25:pc} REG_DEAD flags:CCGC deferring rescan insn with uid = 21. modifying insn i3 20: flags:CCZ=cmp(zero_extract(r101:SI,0x1,0),0) deferring rescan insn with uid = 20. We go from `-(r101&1) < -1` into `(r101 & 1) != 0` which is totally wrong. So yes, it is a dup. *** This bug has been marked as a duplicate of bug 114902 ***