public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: HAO CHEN GUI <guihaoc@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, David <dje.gcc@gmail.com>,
	"Kewen.Lin" <linkw@linux.ibm.com>,
	Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH v3, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]
Date: Tue, 7 Jun 2022 09:51:43 +0800	[thread overview]
Message-ID: <10ddd127-6e61-3699-a3f2-f9141d127af5@linux.ibm.com> (raw)
In-Reply-To: <20220601210129.GX25951@gate.crashing.org>

Hi,

On 2/6/2022 上午 5:01, Segher Boessenkool wrote:
> Hi!
> 
> Some more nitpicking...
> 
> On Wed, May 18, 2022 at 04:52:26PM +0800, HAO CHEN GUI wrote:
>>    const double __builtin_vsx_xsmaxdp (double, double);
>> -    XSMAXDP smaxdf3 {}
>> +    XSMAXDP fmaxdf3 {}
>>
>>    const double __builtin_vsx_xsmindp (double, double);
>> -    XSMINDP smindf3 {}
>> +    XSMINDP fmindf3 {}
> 
> Are s{min,max}df3 still used after this?

Expands reduc_s[min|max]_scal are still using s[min|max]df3.

OPTAB_D (reduc_smax_scal_optab, "reduc_smax_scal_$a")
OPTAB_D (reduc_smin_scal_optab, "reduc_smin_scal_$a")

Also we could implement reduc_f[min|max]_scal after committing
this patch.

Thanks.
Gui Haochen

> 
>> +   UNSPEC_FMAX
>> +   UNSPEC_FMIN
> 
> Pity we have to do this as an unspec still, this should be handled by
> some generic code, with some new operator (fmin/fmax would be obvious
> names :-) )
> 
>> +(define_insn "f<minmax_op><mode>3"
>> +  [(set (match_operand:SFDF 0 "vsx_register_operand" "=wa")
>> +	(unspec:SFDF [(match_operand:SFDF 1 "vsx_register_operand" "wa")
>> +		      (match_operand:SFDF 2 "vsx_register_operand" "wa")]
>> +		      FMINMAX))]
>> +"TARGET_VSX"
>> +"xs<minmax_op>dp %x0,%x1,%x2"
>> +[(set_attr "type" "fp")]
>> +)
> 
> Indentation is broken here, correct is
> 
> (define_insn "f<minmax_op><mode>3"
>   [(set (match_operand:SFDF 0 "vsx_register_operand" "=wa")
> 	(unspec:SFDF [(match_operand:SFDF 1 "vsx_register_operand" "wa")
> 		      (match_operand:SFDF 2 "vsx_register_operand" "wa")]
> 		     FMINMAX))]
>   "TARGET_VSX"
>   "xs<minmax_op>dp %x0,%x1,%x2"
>   [(set_attr "type" "fp")])
> 
> (FMINMAX has the same indent as the preceding [, its sibling;
> "TARGET_VSX" and the next two lines are indented like the same thing
> before it at the same level (the "[(set"); the finishing ) does never
> start a new line).
> 
> 
> Segher

  reply	other threads:[~2022-06-07  1:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  8:52 HAO CHEN GUI
2022-05-30  1:24 ` Ping " HAO CHEN GUI
2022-05-30  9:56 ` Kewen.Lin
2022-06-01 21:01 ` Segher Boessenkool
2022-06-07  1:51   ` HAO CHEN GUI [this message]
2022-06-07 20:44     ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10ddd127-6e61-3699-a3f2-f9141d127af5@linux.ibm.com \
    --to=guihaoc@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).