This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/30455] i386 generates unnecessary TEST instructions for arithmetic ops on memory
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2007 23:43:03 -0000
- Subject: [Bug rtl-optimization/30455] i386 generates unnecessary TEST instructions for arithmetic ops on memory
- References: <bug-30455-10309@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from ubizjak at gmail dot com 2007-01-13 23:43 -------
(In reply to comment #1)
>
> Combine pass then creates:
>
> (insn 15 14 16 2 (parallel [
> (set (reg:SI 58 [ temp.27 ])
> (plus:SI (reg/v:SI 62 [ y ])
> (mem:SI (reg/v/f:DI 61 [ x ]) [2 S4 A32])))
> (clobber (reg:CC 17 flags))
> ]) 207 {*addsi_1} (insn_list:REG_DEP_TRUE 6 (insn_list:REG_DEP_TRUE 7
> (nil)))
> (expr_list:REG_UNUSED (reg:CC 17 flags)
> (expr_list:REG_DEAD (reg/v:SI 62 [ y ])
> (nil))))
>
> (insn 16 15 40 2 (set (mem:SI (reg/v/f:DI 61 [ x ]) [2 S4 A32])
> (reg:SI 58 [ temp.27 ])) 40 {*movsi_1} (insn_list:REG_DEP_TRUE 15
> (nil))
> (expr_list:REG_DEAD (reg/v/f:DI 61 [ x ])
> (nil)))
>
> (insn 40 16 41 2 (set (reg:CCGOC 17 flags)
> (compare:CCGOC (reg:SI 58 [ temp.27 ])
> (const_int 0 [0x0]))) 3 {*cmpsi_ccno_1} (nil)
> (expr_list:REG_DEAD (reg:SI 58 [ temp.27 ])
> (nil)))
Huh, is there any reason why insn 40 does not have any insn links?? It should
link to insn 15 as it uses reg 58. This is also seen in .140r.life1 pass.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30455