http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46315
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-14 11:34:42 UTC --- The problem is indeed the note, but I don't think it comes from it being sort of self-referential. The use of reg 83 in the note doesn't make it live so ce1 merges BB 4 just before insn 75: (note 19 18 22 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn 22 19 23 4 pr43615.c:10 (set (reg:SI 86) (sign_extend:SI (mem:QI (plus:SI (reg/v/f:SI 83 [ s ]) (const_int 1 [0x1])) [0 S1 A8]))) 96 {extendqisi2} (expr_list:REG_DEAD (reg/v/f:SI 73 [ s ]) (nil))) (insn 23 22 24 4 pr43615.c:10 (parallel [ (set (reg/v:SI 81 [ d ]) (plus:SI (reg:SI 86) (const_int -48 [0xffffffd0]))) (clobber (reg:CC 17 flags)) ]) 197 {*addsi_1} (expr_list:REG_DEAD (reg:SI 86) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil)))) (insn 24 23 25 4 pr43615.c:11 (set (reg:CC 17 flags) (compare:CC (reg/v:SI 81 [ d ]) (const_int 9 [0x9]))) 6 {*cmpsi_1} (nil)) (jump_insn 25 24 26 4 pr43615.c:11 (set (pc) (if_then_else (gtu (reg:CC 17 flags) (const_int 0 [0x0])) (label_ref:SI 68) (pc))) 464 {*jcc_1} (expr_list:REG_DEAD (reg:CC 17 flags) (expr_list:REG_BR_PROB (const_int 450 [0x1c2]) (nil))) -> 68) (note 26 25 75 5 [bb 5] NOTE_INSN_BASIC_BLOCK) (insn 75 26 29 5 pr43615.c:10 (set (reg/v/f:SI 83 [ s ]) (reg/f:SI 95 [ s ])) -1 (expr_list:REG_EQUAL (plus:SI (reg/v/f:SI 83 [ s ]) (const_int 2 [0x2])) (nil))) with BB 11: (note 67 68 5 11 [bb 11] NOTE_INSN_BASIC_BLOCK) (insn 5 67 72 11 pr43615.c:12 (set (reg/v/f:SI 83 [ s ]) (const_int 0 [0x0])) 44 {*movsi_1} (nil)) yielding: (note 19 18 22 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn 22 19 23 4 pr43615.c:10 (set (reg:SI 86) (sign_extend:SI (mem:QI (plus:SI (reg/v/f:SI 83 [ s ]) (const_int 1 [0x1])) [0 S1 A8]))) 96 {extendqisi2} (expr_list:REG_DEAD (reg/v/f:SI 73 [ s ]) (nil))) (insn 23 22 5 4 pr43615.c:10 (parallel [ (set (reg/v:SI 81 [ d ]) (plus:SI (reg:SI 86) (const_int -48 [0xffffffd0]))) (clobber (reg:CC 17 flags)) ]) 197 {*addsi_1} (expr_list:REG_DEAD (reg:SI 86) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil)))) (insn 5 23 24 4 pr43615.c:12 (set (reg/v/f:SI 83 [ s ]) (const_int 0 [0x0])) 44 {*movsi_1} (nil)) (insn 24 5 25 4 pr43615.c:11 (set (reg:CC 17 flags) (compare:CC (reg/v:SI 81 [ d ]) (const_int 9 [0x9]))) 6 {*cmpsi_1} (nil)) (jump_insn 25 24 26 4 pr43615.c:11 (set (pc) (if_then_else (gtu (reg:CC 17 flags) (const_int 0 [0x0])) (label_ref:SI 46) (pc))) 464 {*jcc_1} (expr_list:REG_DEAD (reg:CC 17 flags) (expr_list:REG_BR_PROB (const_int 450 [0x1c2]) (nil))) -> 46) (insn 75 26 29 5 pr43615.c:10 (set (reg/v/f:SI 83 [ s ]) (reg/f:SI 95 [ s ])) -1 (expr_list:REG_EQUAL (plus:SI (reg/v/f:SI 83 [ s ]) (const_int 2 [0x2])) (nil))) and insn 5 now feeds the note.