This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35646] gcc is not using the overflow flag
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2008 10:09:55 -0000
- Subject: [Bug target/35646] gcc is not using the overflow flag
- References: <bug-35646-3511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-03-20 10:09 -------
Ok, usually combine does the transformation, but it doesn't match
(insn 7 4 8 2 t.c:2 (parallel [
(set (reg:SI 58 [ D.1549 ])
(plus:SI (reg/v:SI 60 [ b ])
(mem:SI (reg/v/f:DI 59 [ a ]) [2 S4 A32])))
(clobber (reg:CC 17 flags))
]) 249 {*addsi_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
(insn 8 7 9 2 t.c:2 (set (mem:SI (reg/v/f:DI 59 [ a ]) [2 S4 A32])
(reg:SI 58 [ D.1549 ])) 47 {*movsi_1} (expr_list:REG_DEAD (reg/v/f:DI
59 [ a ])
(nil)))
(insn 9 8 10 2 t.c:2 (set (reg:CC 17 flags)
(compare:CC (reg/v:SI 60 [ b ])
(reg:SI 58 [ D.1549 ]))) 5 {*cmpsi_1_insn} (expr_list:REG_DEAD
(reg/v:SI 60 [ b ])
(expr_list:REG_DEAD (reg:SI 58 [ D.1549 ])
(nil))))
because insn 7 has a memory operand which is clobbered inbetween the
comparison and the addition.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35646