This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/33302] dead-store not eliminated



------- Comment #11 from rguenth at gcc dot gnu dot org  2007-09-06 12:13 -------
The extra store you still see is caused by -ftracer duplicating it. 
Optimizations
after that don't catch that (because of the intervening possibly aliasing loads
I guess):

(insn 25 24 27 4 t.ii:3 (set (mem/s:SI (reg/f:DI 102) [4 <variable>.D.2014.a+0
S4 A64])
        (reg:SI 75)) 47 {*movsi_1} (expr_list:REG_DEAD (reg:SI 75)
        (expr_list:REG_EQUAL (plus:SI (mem/s:SI (reg/f:DI 102) [4
<variable>.D.2014.a+0 S4 A64])
                (const_int 4 [0x4]))
            (nil))))

(insn 27 25 28 4 t.ii:18 (set (reg:DI 78 [ <variable>.addr ])
        (zero_extend:DI (mem/s:SI (reg/f:DI 101) [4 <variable>.addr+0 S4
A64]))) 120 {zero_extendsidi2_rex64} (nil))

...

(insn 96 95 97 4 t.ii:3 (parallel [
            (set (reg:SI 83)
                (plus:SI (reg:SI 76 [ <variable>.D.2014.a ])
                    (const_int 6 [0x6])))
            (clobber (reg:CC 17 flags))
        ]) 235 {*addsi_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_DEAD (reg:SI 84 [ <variable>.D.2014.a ])
            (nil))))

(insn 97 96 98 4 t.ii:3 (set (mem/s:SI (reg/f:DI 102) [4 <variable>.D.2014.a+0
S4 A64])
        (reg:SI 83)) 47 {*movsi_1} (expr_list:REG_EQUAL (plus:SI (mem/s:SI
(reg/f:DI 102) [4 <variable>.D.2014.a+0 S4 A64])
            (const_int 2 [0x2]))
        (expr_list:REG_DEAD (reg:SI 83)
            (nil))))


If you build without -ftracer or without -fforce-addr it works (but won't
combine the add on one path).  But.. -ftracer was supposed to be moved
to the tree level...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33302


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]