public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Liu, Hongtao" <hongtao.liu@intel.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Richard Biener <richard.guenther@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Canonicalize (vec_duplicate (not A)) to (not (vec_duplicate A)).
Date: Thu, 3 Jun 2021 13:06:24 +0200	[thread overview]
Message-ID: <20210603110624.GE7746@tucnak> (raw)
In-Reply-To: <CY4PR11MB2007083223D73249A34A3777E53C9@CY4PR11MB2007.namprd11.prod.outlook.com>

On Thu, Jun 03, 2021 at 11:03:43AM +0000, Liu, Hongtao via Gcc-patches wrote:
> In simplify_rtx, no simplication occurs, there is just the difference between
>  (vec_duplicate (not REG)) and (not (vec_duplicate (REG)). So here tem will only be 0.
> Basically we don't know it's a simplication until combine successfully split the
> 3->2 instructions (not + broadcast + and to andnot + broadcast), but it's pretty awkward
> to do this in combine.
> 
> Consider andnot is existed for many backends, I think a canonicalization is needed here.
> Maybe we can add insn canonicalization for transforming (and (vect_duplicate (not A)) B) to 
> (and (not (duplicate (not A)) B) instead of (vec_duplicate (not A)) to (not (vec_duplicate A))?

For the (not (vec_duplicate)) vs. (vec_duplicate (not)) it isn't clear which
one is generally a win on major targets, so I'd say it is better to add a
combine splitter to swap it in backends that want that.

	Jakub


  reply	other threads:[~2021-06-03 11:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  5:49 [PATCH][i386] Split not+broadcast+pand to broadcast+pandn Hongtao Liu
2021-05-25  6:11 ` Andrew Pinski
2021-05-25  6:23   ` Hongtao Liu
2021-05-25  6:29     ` Andrew Pinski
2021-05-25  6:34       ` Hongtao Liu
2021-05-26  1:21         ` Hongtao Liu
2021-05-26  4:12           ` Andrew Pinski
2021-05-26  5:17             ` Hongtao Liu
2021-06-01  8:32               ` Hongtao Liu
2021-06-01 13:54                 ` Segher Boessenkool
2021-06-01 14:02                 ` Segher Boessenkool
2021-06-02  5:39                   ` liuhongt
2021-06-02  5:39                     ` [PATCH] Canonicalize (vec_duplicate (not A)) to (not (vec_duplicate A)) liuhongt
2021-06-02  7:07                       ` Richard Biener
2021-06-02 20:46                         ` Segher Boessenkool
2021-06-03 11:03                           ` Liu, Hongtao
2021-06-03 11:06                             ` Jakub Jelinek [this message]
2021-06-03 19:59                             ` Segher Boessenkool
2021-06-04  2:48                               ` Liu, Hongtao
2021-06-02  5:49                     ` Hongtao Liu
2021-06-02  5:41                   ` [PATCH] Canonicalize (vec_duplicate (not A)) to (not (vec_duplicate A)) liuhongt

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=20210603110624.GE7746@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=richard.guenther@gmail.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).