From: "Kewen.Lin" <linkw@linux.ibm.com>
To: HAO CHEN GUI <guihaoc@linux.ibm.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
David <dje.gcc@gmail.com>, Peter Bergner <bergner@linux.ibm.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, rs6000] TARGET_MADDLD should include TARGET_POWERPC64
Date: Wed, 3 Aug 2022 17:23:01 +0800 [thread overview]
Message-ID: <810d3a70-e010-4840-d5a8-a3aff6aa3ff2@linux.ibm.com> (raw)
In-Reply-To: <eae863c9-661b-328d-3bbe-66b8e97c8fd1@linux.ibm.com>
Hi Haochen,
on 2022/8/3 16:24, HAO CHEN GUI wrote:
> Hi,
> This patch changes the definition of TARGET_MADDLD and includes
> TARGET_POWERPC64, since maddld is a 64 bit instruction.
>
> maddld-1.c now checks "has_arch_ppc64". It depends on a patch which fixes
> empty TU problem.
> https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598744.html
>
aha, I'm going to push it if Segher doesn't have further comments. :)
> Bootstrapped and tested on powerpc64-linux BE and LE with no regressions.
> Is this okay for trunk? Any recommendations? Thanks a lot.
>
> ChangeLog
> 2022-08-03 Haochen Gui <guihaoc@linux.ibm.com>
>
> gcc/
> * config/rs6000/rs6000.h (TARGET_MADDLD): Define.
May be ": Adjust." or ": Adjust with TARGET_POWERPC64.".
>
> gcc/testsuite/
> * gcc.target/powerpc/maddld-1.c: Modify target requirement to compile
> it on the target which supports 64 bit instructions.
>
May be ": Add effective target has_arch_ppc64."
OK with these nits adjusted or not.
BR,
Kewen
>
> patch.diff
> diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
> index 7d04556304a..2f15451fd8b 100644
> --- a/gcc/config/rs6000/rs6000.h
> +++ b/gcc/config/rs6000/rs6000.h
> @@ -466,7 +466,7 @@ extern int rs6000_vector_align[];
> #define TARGET_FCTIWUZ TARGET_POPCNTD
> #define TARGET_CTZ TARGET_MODULO
> #define TARGET_EXTSWSLI (TARGET_MODULO && TARGET_POWERPC64)
> -#define TARGET_MADDLD TARGET_MODULO
> +#define TARGET_MADDLD (TARGET_MODULO && TARGET_POWERPC64)
>
> #define TARGET_XSCVDPSPN (TARGET_DIRECT_MOVE || TARGET_P8_VECTOR)
> #define TARGET_XSCVSPDPN (TARGET_DIRECT_MOVE || TARGET_P8_VECTOR)
> diff --git a/gcc/testsuite/gcc.target/powerpc/maddld-1.c b/gcc/testsuite/gcc.target/powerpc/maddld-1.c
> index 4edecf1c86d..0a53658e058 100644
> --- a/gcc/testsuite/gcc.target/powerpc/maddld-1.c
> +++ b/gcc/testsuite/gcc.target/powerpc/maddld-1.c
> @@ -1,4 +1,4 @@
> -/* { dg-do compile } */
> +/* { dg-do compile { target { has_arch_ppc64 } } } */
> /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
>
> /* This file tests the maddld instruction can be used in SI mode
next prev parent reply other threads:[~2022-08-03 9:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 8:24 HAO CHEN GUI
2022-08-03 9:23 ` Kewen.Lin [this message]
2022-08-03 16:54 ` Segher Boessenkool
2022-08-04 3:17 ` HAO CHEN GUI
2022-08-04 17:24 ` Segher Boessenkool
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=810d3a70-e010-4840-d5a8-a3aff6aa3ff2@linux.ibm.com \
--to=linkw@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=guihaoc@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).