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



--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-01 10:40:37 
UTC ---

(In reply to comment #1)

> Started with http://gcc.gnu.org/viewcvs?view=revision&revision=192719

> The interesting thing is that this happened before, definitely in r190614,

> afterwards was fixed in some commit, and 190777 was fine.



As the test name implies, it was PR46254. The problem there was that %rbx is

declared as fixed reg for "-fpic -mcmodel=large" case. Fixed regs are

unavailable to RA, so we have to handle it in a special way.



This PR shows a deficiency in how subregs are handled in LRA. The test lives

and dies by correct subreg handling in the RA.



For reference, pre-LRA allocator resolved allocation for problematic insn with:



Reloads for insn # 10

Reload 0: reload_in (DI) = (subreg:DI (reg:TI 60 [ i.1 ]) 0)

        reload_out (DI) = (reg:DI 4 si)

        AREG, RELOAD_OTHER (opnum = 0)

        reload_in_reg: (subreg:DI (reg:TI 60 [ i.1 ]) 0)

        reload_out_reg: (subreg:DI (reg:TI 4 si [65]) 0)

        reload_reg_rtx: (reg:DI 0 ax)

Reload 1: reload_in (DI) = (subreg:DI (reg:TI 60 [ i.1 ]) 8)

        reload_out (DI) = (reg:DI 5 di)

        DREG, RELOAD_OTHER (opnum = 1)

        reload_in_reg: (subreg:DI (reg:TI 60 [ i.1 ]) 8)

        reload_out_reg: (subreg:DI (reg:TI 4 si [65]) 8)

        reload_reg_rtx: (reg:DI 1 dx)

Reload 2: reload_in (DI) = (subreg:DI (reg:TI 60 [ i.1 ]) 0)

        reload_out (DI) = (scratch:DI)

        GENERAL_REGS, RELOAD_OTHER (opnum = 5)

        reload_in_reg: (subreg:DI (reg:TI 60 [ i.1 ]) 0)

        reload_out_reg: (scratch:DI)

        reload_reg_rtx: (reg:DI 38 r9)

Reload 3: reload_in (DI) = (subreg:DI (reg:TI 60 [ i.1 ]) 8)

        CREG, RELOAD_FOR_INPUT (opnum = 6)

        reload_in_reg: (subreg:DI (reg:TI 60 [ i.1 ]) 8)

        reload_reg_rtx: (reg:DI 2 cx)

Reply via email to