On Wed, Jun 5, 2013 at 9:14 AM, Hendrik Greving <hendrik.greving.in...@gmail.com> wrote: > I am looking at a case (old GCC 3.2.3 is used), which I like to > outline as follow:
Are you really asking about GCC 3.2.3, released over 10 years ago? > (insn 2219 2218 2220 (nil) (set (reg:SI 1296) > (plus:SI (subreg:SI (reg/v:HI 1277) 0) > (const_int 1 [0x1]))) -1 (nil) > (nil)) This is a paradoxical subreg. It means that the bits in reg 1277 outside of HImode are irrelevant. > (insn 2219 2227 2221 60 0x2aaaad83aa80 (set (reg:SI 1296) > (plus:SI (subreg:SI (reg/v:HI 879) 0) > (const_int 1 [0x1]))) 9 {addsi3} (nil) > (expr_list:REG_DEAD (reg/v:HI 879) > (nil))) > > As you can see is, what happens is that the addsi insn 2219 in 22.lreg > (we only have addsi, not addhi), is getting a reload, but what happens > to be a HI, is now fully SI resulting into a 32 bit load later in the > assembly. > > Question: is it possible to say, is this a bug or a feature? Based on what you have shown, it is not a bug. Ian