public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: HAO CHEN GUI <guihaoc@linux.ibm.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	"Kewen.Lin" <linkw@linux.ibm.com>,
	Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH-2, rs6000] Enable vector mode for memory equality compare [PR111449]
Date: Tue, 10 Oct 2023 16:18:49 +0800	[thread overview]
Message-ID: <beb11bc9-8e76-7bd5-accc-d46154c1447d@linux.ibm.com> (raw)
In-Reply-To: <CAGWvny=2AHOcH7u__C2OYAkF-CNZR=m_aKREcKej41aVFOnaEQ@mail.gmail.com>

Hi David,

  Thanks for your review comments.

在 2023/10/9 23:42, David Edelsohn 写道:
>      #define MOVE_MAX (! TARGET_POWERPC64 ? 4 : 8)
>      #define MAX_MOVE_MAX 8
>     +#define MOVE_MAX_PIECES (!TARGET_POWERPC64 ? 4 : 16)
>     +#define COMPARE_MAX_PIECES (!TARGET_POWERPC64 ? 4 : 16)
> 
> 
> How are the definitions of MOVE_MAX_PIECES and COMPARE_MAX_PIECES determined?  The email does not provide any explanation for the implementation.  The rest of the patch is related to vector support, but vector support is not dependent on TARGET_POWERPC64.

By default, MOVE_MAX_PIECES and COMPARE_MAX_PIECES is set the same value
as MOVE_MAX. The move and compare instructions are required in
compare_by_pieces, those macros are set to 16 byte when supporting
vector mode (V16QImode). The problem is rs6000 hasn't supported TImode
for "-m32". We discussed it in issue 1307. TImode will be used for
move when MOVE_MAX_PIECES is set to 16. But TImode isn't supported
with "-m32" which might cause ICE.

So MOVE_MAX_PIECES and COMPARE_MAX_PIECES is set to 4 for 32 bit
target in this patch. They could be changed to 16 after rs6000
supports TImode with "-m32".

Thanks
Gui Haochen

  reply	other threads:[~2023-10-10  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09  2:30 HAO CHEN GUI
2023-10-09 15:42 ` David Edelsohn
2023-10-10  8:18   ` HAO CHEN GUI [this message]
2023-10-10 12:44     ` David Edelsohn
2023-10-11  9:10       ` HAO CHEN GUI
2023-10-17  2:19     ` Kewen.Lin
2023-10-19  8:39       ` HAO CHEN GUI

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=beb11bc9-8e76-7bd5-accc-d46154c1447d@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).