------- Additional Comments From steven at gcc dot gnu dot org  2005-04-10 
17:24 -------
After CSE1 (t.c.04.cse) we have: 
 
(insn 20 18 22 1 (set (reg:DI 66) 
        (mem/u/c:DI (const:DI (unspec:DI [ 
                        (symbol_ref:DI ("bar") [flags 0x40] <var_decl 
0x2a95a2f000 bar>) 
                    ] 2)) [0 S8 A8])) 81 {*movdi_1_rex64} (nil) 
    (nil)) 
 
(insn 22 20 23 1 (set (reg:DI 68) 
        (const_int 2147483648 [0x80000000])) 81 {*movdi_1_rex64} (nil) 
    (nil)) 
 
(insn 23 22 24 1 (parallel [ 
            (set (reg:DI 67) 
                (plus:DI (reg:DI 66) 
                    (reg:DI 68))) 
            (clobber (reg:CC 17 flags)) 
        ]) 193 {*adddi_1_rex64} (nil) 
    (expr_list:REG_EQUAL (const:DI (plus:DI (symbol_ref:DI ("bar") [flags 
0x40] <var_decl 0x2a95a2f000 bar>) 
                (const_int 2147483648 [0x80000000]))) 
        (nil))) 
 
but old loop (t.c.06.loop) somehow turns this into: 
 
(insn 45 48 46 0 (set (reg:DI 69) 
        (mem/u/c:DI (const:DI (unspec:DI [ 
                        (symbol_ref:DI ("bar") [flags 0x40] <var_decl 
0x2a95a2f000 bar>) 
                    ] 2)) [0 S8 A8])) -1 (nil) 
    (nil)) 
 
(insn 46 45 41 0 (set (reg/f:DI 67) 
        (plus:DI (reg:DI 69) 
            (const_int 2147483648 [0x80000000]))) -1 (nil) 
    (expr_list:REG_EQUAL (const:DI (plus:DI (symbol_ref:DI ("bar") [flags 
0x40] <var_decl 0x2a95a2f000 bar>) 
                (const_int 2147483648 [0x80000000]))) 
        (nil))) 
 
Note how we have lost a clobber and turned a reg+reg addition into a reg+imm; 
from: 
(set (reg:DI 66) (mem:DI (const:DI (unspec:DI [(symbol_ref:DI ("bar"))])))) 
(set (reg:DI 68) (const_int 2147483648 [0x80000000])) 
(parallel [ 
  (set (reg:DI 67) (plus:DI (reg:DI 66) (reg:DI 68))) 
  (clobber (reg:CC 17 flags))]) 
 
to: 
(set (reg:DI 69) (mem:DI (const:DI (unspec:DI [(symbol_ref:DI ("bar"))])))) 
(set (reg/f:DI 67) (plus:DI (reg:DI 69) (const_int 2147483648 [0x80000000]))) 
 
 

-- 


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

Reply via email to