public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: liuhongt <hongtao.liu@intel.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2] Canonicalize vec_merge when mask is constant.
Date: Fri, 5 May 2023 17:34:42 -0600	[thread overview]
Message-ID: <5fb90a4a-6c28-3d74-10d2-0950abca2dad@gmail.com> (raw)
In-Reply-To: <20230504032535.1368877-1-hongtao.liu@intel.com>



On 5/3/23 21:25, liuhongt wrote:
> Here's update patch with documents in md.texi.
> Ok for trunk?
> 
> --------------
> Use swap_communattive_operands_p for canonicalization. When both value
> has same operand precedence value, then first bit in the mask should
> select first operand.
> 
> The canonicalization should help backends for pattern match. .i.e. x86
> backend has lots of vec_merge patterns, combine will create any form
> of vec_merge(mask, or inverted mask), then backend need to add 2
> patterns to match exact 1 instruction. The canonicalization can
> simplify 2 patterns to 1.
> 
> gcc/ChangeLog:
> 
> 	* combine.cc (maybe_swap_commutative_operands): Canonicalize
> 	vec_merge when mask is constant.
> 	* doc/md.texi: Document vec_merge canonicalization.
OK.
jeff

      reply	other threads:[~2023-05-05 23:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20  3:58 [PATCH] " liuhongt
2023-04-30 19:37 ` Jeff Law
2023-05-04  2:49   ` Hongtao Liu
2023-05-04  3:25   ` [PATCH v2] " liuhongt
2023-05-05 23:34     ` Jeff Law [this message]

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=5fb90a4a-6c28-3d74-10d2-0950abca2dad@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.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).