https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111901

--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #13)
> (In reply to Eric Botcazou from comment #12)
> 
> > So what about just marking inline asms with memory clobber as having side
> > effects?
> I guess this would work, the compiler must preserve side effects when
> optimizing.

FTR, clobbers are already marked as having side effects:

side_effect_p ():

    case CLOBBER:
      /* Reject CLOBBER with a non-VOID mode.  These are made by combine.cc
         when some combination can't be done.  If we see one, don't think
         that we can simplify the expression.  */
      return (GET_MODE (x) != VOIDmode);

Reply via email to