On Wed, Oct 18, 2017 at 06:30:23AM -0500, Segher Boessenkool wrote:
> On Wed, Oct 18, 2017 at 11:10:48AM +0000, Bernd Edlinger wrote:
> > A memory clobber would also make rtx_moveable_p return false,
> > thru the following case:
> > 
> >     case MEM:
> >       if (type == OP_IN && MEM_READONLY_P (x))
> >         return rtx_moveable_p (&XEXP (x, 0), OP_IN);
> >       return false;
> > 
> > ...
> > 
> >     case CLOBBER:
> >       return rtx_moveable_p (&SET_DEST (x), OP_OUT);
> > 
> > 
> > because that memory clobber is in a parallel statement
> > together with the ASM_OUTPUT.
> > 
> > Right?
> 
> Yes, that looks correct.  And a memory clobber of course _should_ make
> the insn non-moveable as well -- it's an unknown side effect all by
> itself :-)

Actually, it is not a side effect...  Just kind of behaves like it.
But it does *not* prevent the asm from being deleted, for example.


Segher

Reply via email to