Message ID | 20181111101421.GA3784@arm.com |
---|---|
State | New |
Headers | show |
Series | [AArch64,middle-end,docs] Document the xorsign optab | expand |
On 11/11/18 3:14 AM, Tamar Christina wrote: > Hi All, > > This patch just adds documentation for the xorsign optab that was added a while ago. > > Ok for trunk? > > +@cindex @code{xorsign@var{m}3} instruction pattern > +@item @samp{xorsign@var{m}3} > +Target suppports an efficient expansion of x * copysign (1.0, y) > +as xorsign (x, y). Store a value with the magnitude of operand 1 > +and the sign of operand 2 into operand 0. All operands have mode > +@var{m}, which is a scalar or vector floating-point mode. > + > +This pattern is not allowed to @code{FAIL}. > + Hmmm, needs markup, plus it's a little confusing. How about describing it as Equivalent to @samp{op0 = op1 * copysign (1.0, op2)}: store a value with the magnitude of operand 1 and the sign of operand 2 into operand 0. All operands have mode @var{m}, which is a scalar or vector floating-point mode. This pattern is not allowed to @code{FAIL}. -Sandra
Hi Sandra, > > Ok for trunk? > > > > +@cindex @code{xorsign@var{m}3} instruction pattern > > +@item @samp{xorsign@var{m}3} > > +Target suppports an efficient expansion of x * copysign (1.0, y) > > +as xorsign (x, y). Store a value with the magnitude of operand 1 > > +and the sign of operand 2 into operand 0. All operands have mode > > +@var{m}, which is a scalar or vector floating-point mode. > > + > > +This pattern is not allowed to @code{FAIL}. > > + > > Hmmm, needs markup, plus it's a little confusing. How about describing > it as > > Equivalent to @samp{op0 = op1 * copysign (1.0, op2)}: store a value with > the magnitude of operand 1 and the sign of operand 2 into operand 0. > All operands have mode @var{m}, which is a scalar or vector > floating-point mode. > > This pattern is not allowed to @code{FAIL}. That works for me, updated patch attached. OK for trunk? Thanks, Tamar > > -Sandra -- diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 360b36b862f7eb13964e60ff53b04e1274f89fe4..cf779b5eb16812c244ec7eb032a33680149bba85 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -5997,6 +5997,15 @@ vector floating-point mode. This pattern is not allowed to @code{FAIL}. +@cindex @code{xorsign@var{m}3} instruction pattern +@item @samp{xorsign@var{m}3} +Equivalent to @samp{op0 = op1 * copysign (1.0, op2)}: store a value with +the magnitude of operand 1 and the sign of operand 2 into operand 0. +All operands have mode @var{m}, which is a scalar or vector +floating-point mode. + +This pattern is not allowed to @code{FAIL}. + @cindex @code{ffs@var{m}2} instruction pattern @item @samp{ffs@var{m}2} Store into operand 0 one plus the index of the least significant 1-bit
On 11/12/18 5:10 AM, Tamar Christina wrote: > Hi Sandra, > >>> Ok for trunk? >>> >>> +@cindex @code{xorsign@var{m}3} instruction pattern >>> +@item @samp{xorsign@var{m}3} >>> +Target suppports an efficient expansion of x * copysign (1.0, y) >>> +as xorsign (x, y). Store a value with the magnitude of operand 1 >>> +and the sign of operand 2 into operand 0. All operands have mode >>> +@var{m}, which is a scalar or vector floating-point mode. >>> + >>> +This pattern is not allowed to @code{FAIL}. >>> + >> >> Hmmm, needs markup, plus it's a little confusing. How about describing >> it as >> >> Equivalent to @samp{op0 = op1 * copysign (1.0, op2)}: store a value with >> the magnitude of operand 1 and the sign of operand 2 into operand 0. >> All operands have mode @var{m}, which is a scalar or vector >> floating-point mode. >> >> This pattern is not allowed to @code{FAIL}. > > That works for me, updated patch attached. > > OK for trunk? Yes, this is fine. :-) -Sandra
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 360b36b862f7eb13964e60ff53b04e1274f89fe4..510321ef12a167f79875cd13a8683271ee590ebe 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -5997,6 +5997,15 @@ vector floating-point mode. This pattern is not allowed to @code{FAIL}. +@cindex @code{xorsign@var{m}3} instruction pattern +@item @samp{xorsign@var{m}3} +Target suppports an efficient expansion of x * copysign (1.0, y) +as xorsign (x, y). Store a value with the magnitude of operand 1 +and the sign of operand 2 into operand 0. All operands have mode +@var{m}, which is a scalar or vector floating-point mode. + +This pattern is not allowed to @code{FAIL}. + @cindex @code{ffs@var{m}2} instruction pattern @item @samp{ffs@var{m}2} Store into operand 0 one plus the index of the least significant 1-bit