This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29401] [4.0/4.1/4.2 Regression] missed-optimization (in unneeded code elimination)
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2006 22:20:12 -0000
- Subject: [Bug target/29401] [4.0/4.1/4.2 Regression] missed-optimization (in unneeded code elimination)
- References: <bug-29401-13382@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from hubicka at ucw dot cz 2006-10-15 22:20 -------
Subject: Re: [4.0/4.1/4.2 Regression] missed-optimization (in unneeded code
elimination)
> (insn:TI 38 37 26 2 (parallel [
> (set (reg:SI 1 dx [+4 ])
> (ashiftrt:SI (reg:SI 1 dx [+4 ])
> (const_int 15 [0xf])))
> (clobber (reg:CC 17 flags))
> ]) 443 {*ashrsi3_1} (nil)
> (expr_list:REG_UNUSED (reg:CC 17 flags)
> (expr_list:REG_UNUSED (reg:SI 1 dx [+4 ])
> (nil))))
>
> note the problematic partially dead DI ax:dx which flow does not handle,
> so the redundant instruction does not get deleted. A peephole might be
> able to fix this until new dataflow maybe handles this case(?).
It seems to me that the instruction is completely dead from post-reload
dataflow point of view (ie return value is just eax and both sets are
correctly marked as unused). Perhaps we just somehow managed to drop
post-read DCE?
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29401