On Fri, Nov 16, 2018 at 8:07 AM Uros Bizjak <ubiz...@gmail.com> wrote:
>
> On Fri, Nov 16, 2018 at 4:57 AM Andi Kleen <a...@firstfloor.org> wrote:
> >
> > From: Andi Kleen <a...@linux.intel.com>
> >
> > The earlier PTWRITE builtin definition was unnecessarily restrictive,
> > only allowing register input to PTWRITE. The instruction actually
> > supports memory operands too, so allow that too.
> >
> > gcc/:
> >
> > 2018-11-15  Andi Kleen  <a...@linux.intel.com>
> >
> >         * config/i386/i386.md: Allow memory operands to ptwrite.
>
> OK.

Btw, I wonder why the ptwrite builtin is in SPECIAL_ARGS2
commented as /* Add all special builtins with variable number of operands. */?

On the GIMPLE level this builtin also has quite some (bad) effects on
alias analysis and any related optimization (vectorization, etc.).  I'll have
to see where the instrumenting pass now resides.

Richard.

> Thanks,
> Uros.
>
> > ---
> >  gcc/config/i386/i386.md | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
> > index 44db8ac954c..9c359c0ca04 100644
> > --- a/gcc/config/i386/i386.md
> > +++ b/gcc/config/i386/i386.md
> > @@ -19501,7 +19501,7 @@
> >     (set_attr "prefix_extra" "2")])
> >
> >  (define_insn "ptwrite<mode>"
> > -  [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")]
> > +  [(unspec_volatile [(match_operand:SWI48 0 "nonimmediate_operand" "rm")]
> >                     UNSPECV_PTWRITE)]
> >    "TARGET_PTWRITE"
> >    "ptwrite\t%0"
> > --
> > 2.19.1
> >

Reply via email to