This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR optimization/7520
> I mean this. Clobbering a register does not give it a new value.
Ok, I was probably thinking more of the register in itself than of the value
it has to carry.
So the flow2 pass has the right to inconditionally put its REG_DEAD note
here:
(insn 96 37 38 1 (nil) (set (reg:SI 0 eax)
(reg:SI 3 ebx)) 38 {*movsi_1} (insn_list 98 (nil))
(nil))
(insn:HI 38 96 39 1 0x40188814 (parallel [
(set (reg:CCZ 17 flags)
(compare:CCZ (ior:SI (reg:SI 0 eax)
(reg:SI 2 ecx [61]))
(const_int 0 [0x0])))
(clobber (reg:SI 0 eax))
]) 217 {*iorsi_3} (insn_list 97 (insn_list 96 (nil)))
(expr_list:REG_DEAD (reg:SI 0 eax)
(nil)))
regardless of what follows, in particular:
;; End of basic block 1, registers live:
0 [ax] 2 [cx] 3 [bx] 6 [bp] 7 [sp] 16 [] 20 [frame] ?
That's a bit counter-intuitive.
--
Eric Botcazou