public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Fix vect_long_mult on Power [PR109705]
@ 2024-01-16  2:42 Kewen.Lin
  2024-01-26 22:42 ` Andrew Pinski
  0 siblings, 1 reply; 3+ messages in thread
From: Kewen.Lin @ 2024-01-16  2:42 UTC (permalink / raw)
  To: GCC Patches
  Cc: Segher Boessenkool, David Edelsohn, Peter Bergner, Richard Biener

Hi,

As pointed out by the discussion in PR109705, the current
vect_long_mult effective target check on Power is broken.
This patch is to fix it accordingly.

With additional change by adding a guard vect_long_mult
in gcc.dg/vect/pr25413a.c , it's tested well on Power{8,9}
LE & BE (also on Power10 LE as before).

I'm going to push this soon.

BR,
Kewen
-----
	PR testsuite/109705

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_vect_long_mult):
	Fix powerpc*-*-* checks.
---
 gcc/testsuite/lib/target-supports.exp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 81ae92a0266..fac32fb3d0e 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9073,9 +9073,9 @@ proc check_effective_target_vect_int_mult { } {

 proc check_effective_target_vect_long_mult { } {
     if { [istarget i?86-*-*] || [istarget x86_64-*-*]
-	 || (([istarget powerpc*-*-*]
-              && ![istarget powerpc-*-linux*paired*])
-              && [check_effective_target_ilp32])
+	 || ([istarget powerpc*-*-*]
+	      && [check_effective_target_powerpc_vsx_ok]
+	      && [check_effective_target_has_arch_pwr10])
 	 || [is-effective-target arm_neon]
 	 || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
 	 || [istarget aarch64*-*-*]
--
2.39.1

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

* Re: [PATCH] testsuite: Fix vect_long_mult on Power [PR109705]
  2024-01-16  2:42 [PATCH] testsuite: Fix vect_long_mult on Power [PR109705] Kewen.Lin
@ 2024-01-26 22:42 ` Andrew Pinski
  2024-01-29  2:39   ` Kewen.Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2024-01-26 22:42 UTC (permalink / raw)
  To: Kewen.Lin, Andrew Pinski (QUIC)
  Cc: GCC Patches, Segher Boessenkool, David Edelsohn, Peter Bergner,
	Richard Biener

[-- Attachment #1: Type: text/plain, Size: 1984 bytes --]

On Mon, Jan 15, 2024 at 6:43 PM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi,
>
> As pointed out by the discussion in PR109705, the current
> vect_long_mult effective target check on Power is broken.
> This patch is to fix it accordingly.
>
> With additional change by adding a guard vect_long_mult
> in gcc.dg/vect/pr25413a.c , it's tested well on Power{8,9}
> LE & BE (also on Power10 LE as before).

I see this is still broken for 32bit PowerPC where vect_long_mult
should return true still since long there is 32bit and there is a
32bit vector multiply.
Can someone test (and apply if approved) the attached patch to see if
it fixes pr25413a.c for powerpc*-*-* for 32bit?

Thanks,
Andrew Pinski

>
> I'm going to push this soon.
>
> BR,
> Kewen
> -----
>         PR testsuite/109705
>
> gcc/testsuite/ChangeLog:
>
>         * lib/target-supports.exp (check_effective_target_vect_long_mult):
>         Fix powerpc*-*-* checks.
> ---
>  gcc/testsuite/lib/target-supports.exp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 81ae92a0266..fac32fb3d0e 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -9073,9 +9073,9 @@ proc check_effective_target_vect_int_mult { } {
>
>  proc check_effective_target_vect_long_mult { } {
>      if { [istarget i?86-*-*] || [istarget x86_64-*-*]
> -        || (([istarget powerpc*-*-*]
> -              && ![istarget powerpc-*-linux*paired*])
> -              && [check_effective_target_ilp32])
> +        || ([istarget powerpc*-*-*]
> +             && [check_effective_target_powerpc_vsx_ok]
> +             && [check_effective_target_has_arch_pwr10])
>          || [is-effective-target arm_neon]
>          || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
>          || [istarget aarch64*-*-*]
> --
> 2.39.1

[-- Attachment #2: pr109705.diff.txt --]
[-- Type: text/plain, Size: 812 bytes --]

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 9fc5aae166d..52a2aec9982 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9086,8 +9086,9 @@ proc check_effective_target_vect_int_mult { } {
 proc check_effective_target_vect_long_mult { } {
     if { [istarget i?86-*-*] || [istarget x86_64-*-*]
 	 || ([istarget powerpc*-*-*]
-	      && [check_effective_target_powerpc_vsx_ok]
-	      && [check_effective_target_has_arch_pwr10])
+	      && ([check_effective_target_ilp32]
+		  || ([check_effective_target_powerpc_vsx_ok]
+	              && [check_effective_target_has_arch_pwr10])))
 	 || [is-effective-target arm_neon]
 	 || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
 	 || ([istarget aarch64*-*-*]

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

* Re: [PATCH] testsuite: Fix vect_long_mult on Power [PR109705]
  2024-01-26 22:42 ` Andrew Pinski
@ 2024-01-29  2:39   ` Kewen.Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Kewen.Lin @ 2024-01-29  2:39 UTC (permalink / raw)
  To: Andrew Pinski, Andrew Pinski (QUIC)
  Cc: GCC Patches, Segher Boessenkool, David Edelsohn, Peter Bergner,
	Richard Biener

on 2024/1/27 06:42, Andrew Pinski wrote:
> On Mon, Jan 15, 2024 at 6:43 PM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>
>> Hi,
>>
>> As pointed out by the discussion in PR109705, the current
>> vect_long_mult effective target check on Power is broken.
>> This patch is to fix it accordingly.
>>
>> With additional change by adding a guard vect_long_mult
>> in gcc.dg/vect/pr25413a.c , it's tested well on Power{8,9}
>> LE & BE (also on Power10 LE as before).
> 
> I see this is still broken for 32bit PowerPC where vect_long_mult
> should return true still since long there is 32bit and there is a
> 32bit vector multiply.
> Can someone test (and apply if approved) the attached patch to see if
> it fixes pr25413a.c for powerpc*-*-* for 32bit?

Thanks for fixing, it works perfectly as tested.

I just pushed it as r14-8485 (also updating with a tab and commit log).

BR,
Kewen

> 
> Thanks,
> Andrew Pinski
> 
>>
>> I'm going to push this soon.
>>
>> BR,
>> Kewen
>> -----
>>         PR testsuite/109705
>>
>> gcc/testsuite/ChangeLog:
>>
>>         * lib/target-supports.exp (check_effective_target_vect_long_mult):
>>         Fix powerpc*-*-* checks.
>> ---
>>  gcc/testsuite/lib/target-supports.exp | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
>> index 81ae92a0266..fac32fb3d0e 100644
>> --- a/gcc/testsuite/lib/target-supports.exp
>> +++ b/gcc/testsuite/lib/target-supports.exp
>> @@ -9073,9 +9073,9 @@ proc check_effective_target_vect_int_mult { } {
>>
>>  proc check_effective_target_vect_long_mult { } {
>>      if { [istarget i?86-*-*] || [istarget x86_64-*-*]
>> -        || (([istarget powerpc*-*-*]
>> -              && ![istarget powerpc-*-linux*paired*])
>> -              && [check_effective_target_ilp32])
>> +        || ([istarget powerpc*-*-*]
>> +             && [check_effective_target_powerpc_vsx_ok]
>> +             && [check_effective_target_has_arch_pwr10])
>>          || [is-effective-target arm_neon]
>>          || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
>>          || [istarget aarch64*-*-*]
>> --
>> 2.39.1

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

end of thread, other threads:[~2024-01-29  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16  2:42 [PATCH] testsuite: Fix vect_long_mult on Power [PR109705] Kewen.Lin
2024-01-26 22:42 ` Andrew Pinski
2024-01-29  2:39   ` Kewen.Lin

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