------- Additional Comments From uros at kss-loka dot si  2005-06-03 08:13 
-------
It looks that REG_EQUAL notes gets lost between regmove and lreg pass. A 
relevant part from compiling an example in description with '-O2' shows:

pr21508.c.19.regmove:

(note:HI 7 6 12 0 NOTE_INSN_FUNCTION_BEG)

(insn:HI 12 7 13 0 (set (reg:DF 62)
        (mem/u/i:DF (symbol_ref/u:SI ("*.LC1") [flags 0x2]) [2 S8 A64])) 65 
{*movdf_nointeger} (nil)
    (expr_list:REG_EQUAL (const_double:DF -2147483648 [0x80000000] 1.0e+0 
[0x0.8p+1])
        (nil)))

in pr21508.c.22.lreg:
(note:HI 7 6 12 0 NOTE_INSN_FUNCTION_BEG)

(insn:HI 12 7 13 0 (set (reg:DF 62)
        (mem/u/i:DF (symbol_ref/u:SI ("*.LC1") [flags 0x2]) [2 S8 A64])) 65 
{*movdf_nointeger} (nil)
    (nil))


However, compiling a simple program, such as:

double test (double a) {
   return a + 1.0;
}

results in fld1 insn being used. REG_EQUAL notes are still present in lreg dump 
file:

(note:HI 7 6 11 0 NOTE_INSN_FUNCTION_BEG)

(insn:HI 11 7 12 0 (set (reg:DF 61)
        (mem/u/i:DF (symbol_ref/u:SI ("*.LC1") [flags 0x2]) [2 S8 A64])) 65 
{*movdf_nointeger} (nil)
    (expr_list:REG_EQUAL (const_double:DF -2147483648 [0x80000000] 1.0e+0 
[0x0.8p+1])
        (nil)))


-- 


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

Reply via email to