This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: store_motion query
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: "DJ Delorie" <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 21 May 2008 16:57:01 -0400
- Subject: Re: store_motion query
- References: <200805212048.m4LKmn3k029455@greed.delorie.com>
On Wed, May 21, 2008 at 4:48 PM, DJ Delorie <dj@redhat.com> 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 <variable>.buf+0 S2 A8])
> (ashift:HI (reg/v:HI 27 [ n ])
> (subreg:QI (reg/v:HI 27 [ n ]) 0)))
> (clobber (scratch:HI))
> ]) 223 {ashlhi3_i} (expr_list:REG_DEAD (reg/v:HI 27 [ n ])
> (nil)))
> STORE MOTION replaced with insn:
> (insn 27 8 9 2 dj.c:10 (set (reg:HI 29 [ <variable>.buf ])
> (ashift:HI (reg/v:HI 27 [ n ])
> (subreg:QI (reg/v:HI 27 [ n ]) 0))) -1 (expr_list:REG_DEAD (reg/v:HI 27 [ n ])
> (nil)))
> deleting insn with uid = 8.
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.