https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70160
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, combine optimizes away the looping, most likely because of the undefined initial value of the iterator. And at the start of STV pass we have: (insn 13 11 15 2 (set (reg:DI 96 [ _23 ]) (const_int 1 [0x1])) 85 {*movdi_internal} (nil)) ... (insn 17 15 18 2 (set (mem/c:DI (symbol_ref:SI ("a") [flags 0x2] <var_decl 0x7f74a1faacf0 a>) [1 a+0 S8 A64]) (reg/v:DI 91 [ x ])) pr70160.c:10 85 {*movdi_internal} (expr_list:REG_DEAD (reg/v:DI 91 [ x ]) (nil))) ... (insn 33 22 0 2 (set (reg/v:DI 91 [ x ]) (reg:DI 96 [ _23 ])) 85 {*movdi_internal} (nil)) as the only instructions referring to DImode, all this in a single bb that falls thru to EXIT. The insn 17 sets memory to an uninitialized DImode reg, and then insn 33 sets the same pseudo to some other DImode value (dead assignment, as nothing uses it further). Searching for mode conversion candidates... insn 17 is marked as a candidate insn 33 is marked as a candidate Created a new instruction chain #1 Building chain #1... Adding insn 17 to chain #1 Collected chain #1... insns: 17 Computing gain for chain #1... Instruction conversion gain: 0 Registers conversion cost: 0 Total gain: 0 Chain #1 conversion is not profitable Created a new instruction chain #2 Building chain #2... Adding insn 33 to chain #2 r96 def in insn 13 isn't convertible Mark r96 def in insn 13 as requiring both modes in chain #2 Collected chain #2... insns: 33 defs to convert: r96 Computing gain for chain #2... Instruction conversion gain: 6 Registers conversion cost: 5 Total gain: 1 Converting chain #2...