public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix vect_long_mult for aarch64 [PR109705]
@ 2024-01-24 17:36 Andrew Pinski
  2024-01-24 18:12 ` Richard Sandiford
  2024-01-25  0:38 ` H.J. Lu
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Pinski @ 2024-01-24 17:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Pinski

On aarch64, vectorization of `long` multiply can be done if SVE is enabled
or if long is 32bit (ILP32). It can also be done for constants too but there
is no effective target test for that just yet.

Build and tested on aarch64-linux-gnu with no regressions (also tested with SVE enabled).

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_vect_long_mult):
	Fix aarch64*-*-* checks.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/testsuite/lib/target-supports.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 9ca8355b3e1..178d1a73064 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9090,7 +9090,9 @@ proc check_effective_target_vect_long_mult { } {
 	      && [check_effective_target_has_arch_pwr10])
 	 || [is-effective-target arm_neon]
 	 || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
-	 || [istarget aarch64*-*-*]
+	 || ([istarget aarch64*-*-*]
+	     && ([check_effective_target_ilp32]
+		 || check_effective_target_aarch64_sve]))
 	 || ([istarget mips*-*-*]
 	      && [et-is-effective-target mips_msa])
 	 || ([istarget riscv*-*-*]
-- 
2.39.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix vect_long_mult for aarch64 [PR109705]
  2024-01-24 17:36 [PATCH] Fix vect_long_mult for aarch64 [PR109705] Andrew Pinski
@ 2024-01-24 18:12 ` Richard Sandiford
  2024-01-25  0:38 ` H.J. Lu
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Sandiford @ 2024-01-24 18:12 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches

Andrew Pinski <quic_apinski@quicinc.com> writes:
> On aarch64, vectorization of `long` multiply can be done if SVE is enabled
> or if long is 32bit (ILP32). It can also be done for constants too but there
> is no effective target test for that just yet.
>
> Build and tested on aarch64-linux-gnu with no regressions (also tested with SVE enabled).
>
> gcc/testsuite/ChangeLog:
>
> 	* lib/target-supports.exp (check_effective_target_vect_long_mult):
> 	Fix aarch64*-*-* checks.

OK, thanks!

Richard

> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
> ---
>  gcc/testsuite/lib/target-supports.exp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 9ca8355b3e1..178d1a73064 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -9090,7 +9090,9 @@ proc check_effective_target_vect_long_mult { } {
>  	      && [check_effective_target_has_arch_pwr10])
>  	 || [is-effective-target arm_neon]
>  	 || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
> -	 || [istarget aarch64*-*-*]
> +	 || ([istarget aarch64*-*-*]
> +	     && ([check_effective_target_ilp32]
> +		 || check_effective_target_aarch64_sve]))
>  	 || ([istarget mips*-*-*]
>  	      && [et-is-effective-target mips_msa])
>  	 || ([istarget riscv*-*-*]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix vect_long_mult for aarch64 [PR109705]
  2024-01-24 17:36 [PATCH] Fix vect_long_mult for aarch64 [PR109705] Andrew Pinski
  2024-01-24 18:12 ` Richard Sandiford
@ 2024-01-25  0:38 ` H.J. Lu
  2024-01-25  0:41   ` Andrew Pinski
  1 sibling, 1 reply; 4+ messages in thread
From: H.J. Lu @ 2024-01-25  0:38 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches

On Wed, Jan 24, 2024 at 9:37 AM Andrew Pinski <quic_apinski@quicinc.com> wrote:
>
> On aarch64, vectorization of `long` multiply can be done if SVE is enabled
> or if long is 32bit (ILP32). It can also be done for constants too but there
> is no effective target test for that just yet.
>
> Build and tested on aarch64-linux-gnu with no regressions (also tested with SVE enabled).
>
> gcc/testsuite/ChangeLog:
>
>         * lib/target-supports.exp (check_effective_target_vect_long_mult):
>         Fix aarch64*-*-* checks.
>
> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
> ---
>  gcc/testsuite/lib/target-supports.exp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 9ca8355b3e1..178d1a73064 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -9090,7 +9090,9 @@ proc check_effective_target_vect_long_mult { } {
>               && [check_effective_target_has_arch_pwr10])
>          || [is-effective-target arm_neon]
>          || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
> -        || [istarget aarch64*-*-*]
> +        || ([istarget aarch64*-*-*]
> +            && ([check_effective_target_ilp32]
> +                || check_effective_target_aarch64_sve]))
                        ^ Missing [

I got

ERROR: gcc.dg/vect/pr60656.c: error executing dg-final: invalid
bareword "check_effective_target..."
in expression "...e_target_ilp32]
|| check_effective_target...]))
|| ([istarget mi...";
should be "$check_effective_target..." or
"{check_effective_target...}" or "check_effective_target...(...)" or
...
ERROR: gcc.dg/vect/pr60656.c -flto -ffat-lto-objects: error executing
dg-final: invalid bareword "check_effective_target..."
in expression "...e_target_ilp32]
|| check_effective_target...]))
|| ([istarget mi...";
should be "$check_effective_target..." or
"{check_effective_target...}" or "check_effective_target...(...)" or
...


>          || ([istarget mips*-*-*]
>               && [et-is-effective-target mips_msa])
>          || ([istarget riscv*-*-*]
> --
> 2.39.3
>

I am checking in this to fix it.

-- 
H.J.
---
diff --git a/gcc/testsuite/lib/target-supports.exp
b/gcc/testsuite/lib/target-supports.exp
index 82520119026..49e748caf17 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9092,7 +9092,7 @@ proc check_effective_target_vect_long_mult { } {
    || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
    || ([istarget aarch64*-*-*]
        && ([check_effective_target_ilp32]
-      || check_effective_target_aarch64_sve]))
+      || [check_effective_target_aarch64_sve]))
    || ([istarget mips*-*-*]
         && [et-is-effective-target mips_msa])
    || ([istarget riscv*-*-*]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix vect_long_mult for aarch64 [PR109705]
  2024-01-25  0:38 ` H.J. Lu
@ 2024-01-25  0:41   ` Andrew Pinski
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2024-01-25  0:41 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Andrew Pinski, gcc-patches

On Wed, Jan 24, 2024 at 4:40 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Wed, Jan 24, 2024 at 9:37 AM Andrew Pinski <quic_apinski@quicinc.com> wrote:
> >
> > On aarch64, vectorization of `long` multiply can be done if SVE is enabled
> > or if long is 32bit (ILP32). It can also be done for constants too but there
> > is no effective target test for that just yet.
> >
> > Build and tested on aarch64-linux-gnu with no regressions (also tested with SVE enabled).
> >
> > gcc/testsuite/ChangeLog:
> >
> >         * lib/target-supports.exp (check_effective_target_vect_long_mult):
> >         Fix aarch64*-*-* checks.
> >
> > Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
> > ---
> >  gcc/testsuite/lib/target-supports.exp | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> > index 9ca8355b3e1..178d1a73064 100644
> > --- a/gcc/testsuite/lib/target-supports.exp
> > +++ b/gcc/testsuite/lib/target-supports.exp
> > @@ -9090,7 +9090,9 @@ proc check_effective_target_vect_long_mult { } {
> >               && [check_effective_target_has_arch_pwr10])
> >          || [is-effective-target arm_neon]
> >          || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
> > -        || [istarget aarch64*-*-*]
> > +        || ([istarget aarch64*-*-*]
> > +            && ([check_effective_target_ilp32]
> > +                || check_effective_target_aarch64_sve]))
>                         ^ Missing [
>
> I got
>
> ERROR: gcc.dg/vect/pr60656.c: error executing dg-final: invalid
> bareword "check_effective_target..."
> in expression "...e_target_ilp32]
> || check_effective_target...]))
> || ([istarget mi...";
> should be "$check_effective_target..." or
> "{check_effective_target...}" or "check_effective_target...(...)" or
> ...
> ERROR: gcc.dg/vect/pr60656.c -flto -ffat-lto-objects: error executing
> dg-final: invalid bareword "check_effective_target..."
> in expression "...e_target_ilp32]
> || check_effective_target...]))
> || ([istarget mi...";
> should be "$check_effective_target..." or
> "{check_effective_target...}" or "check_effective_target...(...)" or
> ...
>
>
> >          || ([istarget mips*-*-*]
> >               && [et-is-effective-target mips_msa])
> >          || ([istarget riscv*-*-*]
> > --
> > 2.39.3
> >
>
> I am checking in this to fix it.

I actually just checked in that same fix :)

Thanks,
Andrew

>
> --
> H.J.
> ---
> diff --git a/gcc/testsuite/lib/target-supports.exp
> b/gcc/testsuite/lib/target-supports.exp
> index 82520119026..49e748caf17 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -9092,7 +9092,7 @@ proc check_effective_target_vect_long_mult { } {
>     || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
>     || ([istarget aarch64*-*-*]
>         && ([check_effective_target_ilp32]
> -      || check_effective_target_aarch64_sve]))
> +      || [check_effective_target_aarch64_sve]))
>     || ([istarget mips*-*-*]
>          && [et-is-effective-target mips_msa])
>     || ([istarget riscv*-*-*]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-25  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 17:36 [PATCH] Fix vect_long_mult for aarch64 [PR109705] Andrew Pinski
2024-01-24 18:12 ` Richard Sandiford
2024-01-25  0:38 ` H.J. Lu
2024-01-25  0:41   ` Andrew Pinski

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).