Re: store_motion query

2008-05-22 Thread DJ Delorie
> But it looks like update_ld_motion_stores() and insert_store() also > call gen_move_insn without adding clobbers if necessary. I suppose the > insns produced there should also go through insn_invalid_p somewhere. > I sent a hack for that to DJ, but I guess the proper place to fix this > is insid

Re: store_motion query

2008-05-21 Thread Steven Bosscher
On Thu, May 22, 2008 at 12:06 AM, Steven Bosscher <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 11:41 PM, Steven Bosscher <[EMAIL PROTECTED]> wrote: >> Maybe that should be emit_move_insn()? > > OK, so that is not it. > > The problem is that can_assign_to_reg_p() returns true when x is > (as

Re: store_motion query

2008-05-21 Thread Steven Bosscher
On Wed, May 21, 2008 at 11:41 PM, Steven Bosscher <[EMAIL PROTECTED]> wrote: > Maybe that should be emit_move_insn()? OK, so that is not it. The problem is that can_assign_to_reg_p() returns true when x is (ashift:HI (reg/v:HI 27 [ n ]) (subreg:QI (reg/v:HI 27 [ n ]) 0)). num_clobbers == 1 but ad

Re: store_motion query

2008-05-21 Thread Steven Bosscher
xf. http://gcc.gnu.org/ml/gcc/2008-05/msg00274.html > Why is store_motion doing this? > > STORE_MOTION delete insn in BB 2: > (insn 8 7 27 2 dj.c:10 (parallel [ > (set (mem/s/j:HI (reg/v/f:HI 26 [ s ]) [0 > .buf+0 S2 A8]) > (ashift:HI (re

Re: store_motion query

2008-05-21 Thread DJ Delorie
> It looks like it replaced the store with a reg move, and it should > have inserted the store back to memory with the clobber back later in > the CFG. > > IE it pushed your store down to some later point in the CFG. It's not the store that needs the clobber, it's the shift. The R8C can only u

Re: store_motion query

2008-05-21 Thread Daniel Berlin
On Wed, May 21, 2008 at 4:48 PM, DJ Delorie <[EMAIL PROTECTED]> wrote: > > Why is store_motion doing this? > > STORE_MOTION delete insn in BB 2: > (insn 8 7 27 2 dj.c:10 (parallel [ >(set (mem/s/j:HI (reg/v/f:HI 26 [ s ]) [0 > .buf+0 S2 A8]) >