public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Liu, Hongtao" <hongtao.liu@intel.com>
Cc: Kirill Yukhin <kirill.yukhin@gmail.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2] x86: make VPTERNLOG* usable on less than 512-bit operands with just AVX512F
Date: Mon, 19 Jun 2023 09:09:21 +0200	[thread overview]
Message-ID: <5aa77cbb-02cc-195b-c052-22c2d993a966@suse.com> (raw)
In-Reply-To: <SA1PR11MB675778862DE283CFF3F98E8DE55FA@SA1PR11MB6757.namprd11.prod.outlook.com>

On 19.06.2023 04:07, Liu, Hongtao wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: Friday, June 16, 2023 2:22 PM
>>
>> --- a/gcc/config/i386/sse.md
>> +++ b/gcc/config/i386/sse.md
>> @@ -12597,11 +12597,11 @@
>>     (set_attr "mode" "<sseinsnmode>")])
>>
>>  (define_insn "*<avx512>_vternlog<mode>_all"
>> -  [(set (match_operand:V 0 "register_operand" "=v")
>> +  [(set (match_operand:V 0 "register_operand" "=v,v")
>>  	(unspec:V
>> -	  [(match_operand:V 1 "register_operand" "0")
>> -	   (match_operand:V 2 "register_operand" "v")
>> -	   (match_operand:V 3 "bcst_vector_operand" "vmBr")
>> +	  [(match_operand:V 1 "register_operand" "0,0")
>> +	   (match_operand:V 2 "register_operand" "v,v")
>> +	   (match_operand:V 3 "bcst_vector_operand" "vBr,m")
>>  	   (match_operand:SI 4 "const_0_to_255_operand")]
>>  	  UNSPEC_VTERNLOG))]
>>    "TARGET_AVX512F
> Change condition to <MODE_SIZE> == 64 || TARGET_AVX512VL || (TARGET_AVX512F && !TARGET_PREFER_AVX256)

May I ask why you think this is necessary? The condition of the insn
already wasn't in sync with the condition used in all three splitters,
and I didn't see any reason why now they would need to be brought in
sync. First and foremost because of the use of the UNSPEC (equally
before and after this patch).

Furthermore, isn't it the case that I'm already mostly expressing
this with the "enabled" attribute? At the very least I think I
should drop that again then if following your request?

> Also please add a testcase for case TARGET_AVX512F && !TARGET_PREFER_AVX256.

Especially in a case like this one I'm wondering about the usefulness
of a contrived testcase: It won't test more than one minor sub-case of
the whole set of constructs covered here. But well, here as well as
for the other change I'll invent something.

Jan

  reply	other threads:[~2023-06-19  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  6:22 Jan Beulich
2023-06-19  2:07 ` Liu, Hongtao
2023-06-19  7:09   ` Jan Beulich [this message]
2023-06-19  8:46     ` Hongtao Liu

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=5aa77cbb-02cc-195b-c052-22c2d993a966@suse.com \
    --to=jbeulich@suse.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=kirill.yukhin@gmail.com \
    /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).