[Bug target/35646] gcc is not using the overflow flag

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 20 10:10:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list