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 rtl-optimization/36758] [4.3/4.4 Regression] address addition moved out of the loop



------- Comment #7 from pinskia at gcc dot gnu dot org  2008-09-20 23:32 -------
(In reply to comment #4)
> This might be a cost issue in the ppc backend (and so target, not
> rtl-optimization).

GCSE is pulling out the invariant.
Before GCSE we had:
(insn 20 5 6 3 t.c:6 (set (reg/f:SI 121)
        (plus:SI (reg/f:SI 113 sfp)
            (const_int 8 [0x8]))) -1 (nil))

(insn 6 20 7 3 t.c:6 (set (reg:SI 3 3)
        (reg/f:SI 121)) 325 {*movsi_internal1} (expr_list:REG_EQUAL (plus:SI
(reg/f:SI 113 sfp)
            (const_int 8 [0x8]))
        (nil))) 

(call_insn 7 6 8 3 t.c:6 (parallel [
            (set (reg:SI 3 3)
                (call (mem:SI (symbol_ref:SI ("f0") [flags 0x41] <function_decl
0xf7d41e00 f0>) [0 S4 A8])
                    (const_int 0 [0x0])))
            (use (const_int 0 [0x0]))
            (clobber (reg:SI 65 lr))
        ]) 450 {*call_value_nonlocal_sysvsi} (nil)
    (expr_list:REG_DEP_TRUE (use (reg:SI 3 3))
        (nil)))  

(insn 8 7 10 3 t.c:6 (set (reg:SI 119 [ D.1255 ])
        (reg:SI 3 3)) 325 {*movsi_internal1} (nil)) 

(insn 10 8 11 3 t.c:6 (set (reg:CC 120)
        (compare:CC (reg:SI 119 [ D.1255 ])
            (const_int 0 [0x0]))) 471 {*cmpsi_internal1} (nil))

(jump_insn 11 10 19 3 t.c:6 (set (pc)
        (if_then_else (ne (reg:CC 120)
                (const_int 0 [0x0]))
            (label_ref 9)
            (pc))) 560 {*rs6000.md:13857} (expr_list:REG_BR_PROB (const_int
8600 [0x2198])
        (nil)))

And then it pulled out the set outside of the loop.  
Why didn't we combine the set of reg 121 into its one use in the set of 3
before the fact (like in fwprop)?


-- 


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


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