This is the mail archive of the gcc-patches@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]

Re: [3.3 PATCH] Fix PR optimization/13472


> Do I assume correctly that reg 86 got a REG_EQUAL note for the
> fp constant, due to how it is initialized, and then the REG_EQUAL
> note gets upgraded to REG_EQUIV by local-alloc?

Yes, you do (it's an integer constant).

> If so... it sounds like maybe reg 86 is actually set more than
> once, otherwise reload shouldn't be substituting its equivalent
> memory location onto the lhs of a set.

No, reg 86 is really set only once.  Here are the 3 insns from .lreg where 
it is mentioned:

(insn:HI 147 115 55 3 (nil) (set (reg:SI 86)
        (reg:SI 62)) 38 {*movsi_1} (nil)
    (expr_list:REG_EQUIV (mem/u/f:SI (symbol_ref:SI ("q")) [2 q+0 S4 A32])
        (nil)))

(insn:HI 55 147 56 3 0x40178b58 (set (reg:SI 89)
        (mem:SI (plus:SI (mult:SI (reg:SI 86)
                    (const_int 4 [0x4]))
                (reg:SI 63)) [5 S4 A32])) 38 {*movsi_1} (insn_list 147 (nil))
    (expr_list:REG_DEAD (reg:SI 63)
        (nil)))

(insn:HI 151 66 152 4 (nil) (set (reg:SI 102)
        (reg:SI 86)) 38 {*movsi_1} (nil)
    (expr_list:REG_DEAD (reg:SI 86)
        (nil)))

-- 
Eric Botcazou


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