From: Segher Boessenkool <segher@kernel.crashing.org>
To: Ajit Agarwal <aagarwa1@linux.ibm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Jeff Law <jeffreyalaw@gmail.com>,
Peter Bergner <bergner@linux.ibm.com>,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH v4 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces.
Date: Mon, 1 May 2023 11:21:16 -0500 [thread overview]
Message-ID: <20230501162116.GZ19790@gate.crashing.org> (raw)
In-Reply-To: <8b50f07a-994e-1637-ae4d-2be8dbb25807@linux.ibm.com>
Hi!
On Sat, Apr 22, 2023 at 02:36:20PM +0530, Ajit Agarwal wrote:
> * ree.cc (combline_reaching_defs): Add zero_extend
> using defined abi interfaces.
Typo. Also, please don't wrap lines early. Also, you are missing some
changes in this file in the changelog.
> (add_removable_extension): use of defined abi interfaces
> for no reaching defs.
Capital U.
> (abi_extension_candidate_return_reg_p): New defined ABI function.
What does that even mean? An "ABI function"?
> --- a/gcc/ree.cc
> +++ b/gcc/ree.cc
> @@ -473,7 +473,8 @@ get_defs (rtx_insn *insn, rtx reg, vec<rtx_insn *> *dest)
> break;
> }
>
> - gcc_assert (use != NULL);
> + if (use == NULL)
> + return NULL;
If it is suddenly allowed to have nil here, some comment somewhere needs
to change as well.
> new file mode 100644
> index 00000000000..1d443af066a
> --- /dev/null
> +++ b/gcc/testsuite/g++.target/powerpc/zext-elim-3.C
> @@ -0,0 +1,16 @@
> +/* { dg-do compile { target { powerpc*-*-* } } } */
This is required of all file in g++.target/powerpc/ already:
# Exit immediately if this isn't a PowerPC target.
if {![istarget powerpc*-*-*] } then {
return
}
so please don't repeat that here.
> +/* { dg-require-effective-target lp64 } */
Is that required?!
> +/* { dg-require-effective-target powerpc_p9vector_ok } */
> +/* { dg-options "-mcpu=power9 -O2 -free" } */
Why does this need p9? We should test this on older systems as well, it
is a problem as old as the world!
> +void *memset(void *b, int c, unsigned long len)
> +{
> + unsigned long i;
> +
> + for (i = 0; i < len; i++)
> + ((unsigned char *)b)[i] = c;
> +
> + return b;
> +}
> +
> +/* { dg-final { scan-assembler-not "rlwinm" } } */
Please at least use {\mrlwinm\M}. There are many other insns that can
be used for this same purpose as well. We should at least test rldicl
here as well.
Segher
prev parent reply other threads:[~2023-05-01 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-22 9:06 Ajit Agarwal
2023-04-28 22:42 ` Hans-Peter Nilsson
2023-04-28 23:33 ` Jeff Law
2023-04-28 23:49 ` Hans-Peter Nilsson
2023-05-02 22:00 ` Peter Bergner
2023-05-16 12:35 ` Ajit Agarwal
2023-05-19 19:32 ` Jeff Law
2023-05-01 16:21 ` Segher Boessenkool [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=20230501162116.GZ19790@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=aagarwa1@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=richard.guenther@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).