[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #23 from Andrew Pinski  ---
The testcase now has the corrected check and the check has been fixed (at least
for powerpc* and aarch64) so closing as fixed.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #22 from GCC Commits  ---
The master branch has been updated by Kewen Lin :

https://gcc.gnu.org/g:5b393ac7f1715328ee92236071edc3885bf53317

commit r14-8485-g5b393ac7f1715328ee92236071edc3885bf53317
Author: Andrew Pinski 
Date:   Sun Jan 28 20:35:05 2024 -0600

testsuite: Fix vect_long_mult for 32-bit Power [PR109705]

As PR109705#c17, commit r14-7270 missed to consider long
type is 32bit with option -m32.  This patch is take care of
it accordingly.

Note that the vect_long_mult is supposed to be only used in
vect/ (generic), powerpc_altivec_ok would be guaranteed.

PR testsuite/109705

gcc/testsuite/ChangeLog:

* lib/target-supports.exp (check_effective_target_vect_long_mult):
Fix powerpc*-*-* checks by considering ilp32.

Signed-off-by: Andrew Pinski 

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #21 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #20)
> vect_long_mult is wrong again for powerpc (32bit).
> 
> vect_long_mult should return true for ILP32 powerpc still. Because long is
> 32bit there ...

See https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644098.html for a
patch to test. I cannot test it fully; I tried doing a simple cross build but
that failed.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Andrew Pinski  changed:

   What|Removed |Added

URL|https://gcc.gnu.org/piperma |
   |il/gcc-patches/2024-January |
   |/644004.html|
   Keywords|patch   |

--- Comment #20 from Andrew Pinski  ---
vect_long_mult is wrong again for powerpc (32bit).

vect_long_mult should return true for ILP32 powerpc still. Because long is
32bit there ...

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #19 from Andrew Pinski  ---
(In reply to seurer from comment #17)
> This still fails on power.

Just so I can start to trying to reproduce it, how was your compiler
configured? I want to make sure the testsuite choices are done correctly.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #18 from Andrew Pinski  ---
Hmm. this loop should almost definitely get vectorized if vect_double is true:
  for (i=0;ic+i) = num__infty;

I wonder why it is not on powerpc.

vect_double for powerpc does:
 || ([istarget powerpc*-*-*] && [check_vsx_hw_available])

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-26 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

seurer at gcc dot gnu.org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #17 from seurer at gcc dot gnu.org ---
This still fails on power.

Previously it was:

g:d40b3c1e439db05c835b6bd4fd5bba58fda71dd6, r14-8442-gd40b3c1e439db0
make  -k check-gcc RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'
vect.exp=gcc.dg/vect/pr25413a.c"
FAIL: gcc.dg/vect/pr25413a.c scan-tree-dump-times vect "vectorized 2 loops" 1
FAIL: gcc.dg/vect/pr25413a.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"vectorized 2 loops" 1


Now it is:

g:bfd6b36f08021f023e0e9223f5aea315b74a5c56, r14-8443-gbfd6b36f08021f
make  -k check-gcc RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'
vect.exp=gcc.dg/vect/pr25413a.c"
FAIL: gcc.dg/vect/pr25413a.c scan-tree-dump-times vect "vectorized 1 loops" 1
FAIL: gcc.dg/vect/pr25413a.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"vectorized 1 loops" 1

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #16 from Andrew Pinski  ---
Fixed.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #15 from GCC Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:bfd6b36f08021f023e0e9223f5aea315b74a5c56

commit r14-8443-gbfd6b36f08021f023e0e9223f5aea315b74a5c56
Author: Andrew Pinski 
Date:   Thu Jan 25 13:58:10 2024 -0800

testsuite/vect: Fix pr25413a.c expectations [PR109705]

The 2 loops in octfapg_universe can and will be vectorized now
after r14-333-g6d4b59a9356ac4 on targets that support multiplication
in the long type. But the testcase does not check vect_long_mult for
that, so this patch corrects that error and now the testcase passes
correctly
on aarch64-linux-gnu (with and without SVE).

Built and tested on aarch64-linux-gnu (with and without SVE).

gcc/testsuite/ChangeLog:

PR testsuite/109705
* gcc.dg/vect/pr25413a.c: Expect 1 vectorized loops for
!vect_long_mult
and 2 for vect_long_mult.

Signed-off-by: Andrew Pinski 

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||patch
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2024-January
   ||/644004.html

--- Comment #14 from Andrew Pinski  ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644004.html

It would be useful if tested on powerpc too. I tested it on aarch64 without and
with SVE enabled to make sure vect_long_mult is correct there.
And without SVE enabled we get:
PASS: gcc.dg/vect/pr25413a.c scan-tree-dump-times vect "vectorized 1 loops" 1

And with it being enabled we get:
PASS: gcc.dg/vect/pr25413a.c scan-tree-dump-times vect "vectorized 2 loops" 1


as expected now.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #13 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #11)
> I think the only thing left is updating the testcase to use vect_long_mult
> since both powerpc and aarch64 have updated/corrected vect_long_mult .

I am going to test this patch.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #12 from GCC Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:e6fbc3cc786a74a098352868348e187877bfbc8b

commit r14-8399-ge6fbc3cc786a74a098352868348e187877bfbc8b
Author: Andrew Pinski 
Date:   Wed Jan 24 00:00:34 2024 -0800

Fix vect_long_mult for aarch64 [PR109705]

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:

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

Signed-off-by: Andrew Pinski 

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #11 from Andrew Pinski  ---
(In reply to Richard Biener from comment #1)
> Also aarch64 as reported by Christophe.  We need vect_long_mult for the
> scatter but the effective target looks incomplete.

I think the only thing left is updating the testcase to use vect_long_mult
since both powerpc and aarch64 have updated/corrected vect_long_mult .

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #10 from Andrew Pinski  ---
And yes gcc.dg/vect/pr25413a.c testcase passes when SVE is enabled too.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #9 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #8)
> So for aarch64, vectorized long can be done with SVE enabled or ILP32 or
> with a constant.  I will submit a patch for aarch64 against
> check_effective_target_vect_long_mult tomorrow for that part.

https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643855.html

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org

--- Comment #8 from Andrew Pinski  ---
So for aarch64, vectorized long can be done with SVE enabled or ILP32 or with a
constant.  I will submit a patch for aarch64 against
check_effective_target_vect_long_mult tomorrow for that part.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-21 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Kewen Lin  changed:

   What|Removed |Added

 CC||linkw at gcc dot gnu.org

--- Comment #7 from Kewen Lin  ---
(In reply to Peter Bergner from comment #6)
> (In reply to GCC Commits from comment #5)
> > commit r14-7270-g39fa71a0882928a25bd170580e3e9e89a69dce36
> > Author: Kewen Lin 
> > Date:   Mon Jan 15 20:55:40 2024 -0600
> > 
> > testsuite: Fix vect_long_mult on Power [PR109705]
> > 
> > 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.
> 
> Does this need backporting?

I guess no, the only use of vect_long_mult in release branches is
gcc/testsuite/gcc.dg/vect/pr60656.c which has another check
vect_widen_mult_si_to_di_pattern unsupported on Power.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-19 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #6 from Peter Bergner  ---
(In reply to GCC Commits from comment #5)
> commit r14-7270-g39fa71a0882928a25bd170580e3e9e89a69dce36
> Author: Kewen Lin 
> Date:   Mon Jan 15 20:55:40 2024 -0600
> 
> testsuite: Fix vect_long_mult on Power [PR109705]
> 
> 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.

Does this need backporting?

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #5 from GCC Commits  ---
The master branch has been updated by Kewen Lin :

https://gcc.gnu.org/g:39fa71a0882928a25bd170580e3e9e89a69dce36

commit r14-7270-g39fa71a0882928a25bd170580e3e9e89a69dce36
Author: Kewen Lin 
Date:   Mon Jan 15 20:55:40 2024 -0600

testsuite: Fix vect_long_mult on Power [PR109705]

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

PR testsuite/109705

gcc/testsuite/ChangeLog:

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

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-15 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2024-01-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Richard Biener  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org

--- Comment #4 from Richard Biener  ---
Can target maintainers have a look please?

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2023-05-03 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

--- Comment #3 from rguenther at suse dot de  ---
On Wed, 3 May 2023, segher at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705
> 
> Segher Boessenkool  changed:
> 
>What|Removed |Added
> 
>  Ever confirmed|0   |1
>  Status|UNCONFIRMED |NEW
>Last reconfirmed||2023-05-03
> 
> --- Comment #2 from Segher Boessenkool  ---
> vect_long_mult has
>  || (([istarget powerpc*-*-*]
>   && ![istarget powerpc-*-linux*paired*])
>   && [check_effective_target_ilp32])
> which does not know that p10 has 64x64->64 mult in vectors (and has weird
> parens
> as well :-P )  The linux*paired* case can be removed of course.
> 
> Confirmed.  Should we open a separate bug for this Power problem, or handle it
> here?

Handle it here - the testcase this PR is about clearly lacks a
vect_long_mult requirement on the dump scanning but both aarch64 and
power seem to get that wrong so the fix wouldn't work.

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2023-05-03 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Segher Boessenkool  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-05-03

--- Comment #2 from Segher Boessenkool  ---
vect_long_mult has
 || (([istarget powerpc*-*-*]
  && ![istarget powerpc-*-linux*paired*])
  && [check_effective_target_ilp32])
which does not know that p10 has 64x64->64 mult in vectors (and has weird
parens
as well :-P )  The linux*paired* case can be removed of course.

Confirmed.  Should we open a separate bug for this Power problem, or handle it
here?

[Bug testsuite/109705] [14 regression] gcc.dg/vect/pr25413a.c fails after r14-333-g6d4b59a9356ac4

2023-05-03 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109705

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |14.0
 Target|powerpc64le-linux-gnu   |powerpc64le-linux-gnu,
   ||aarch64
   Keywords||testsuite-fail

--- Comment #1 from Richard Biener  ---
Also aarch64 as reported by Christophe.  We need vect_long_mult for the scatter
but the effective target looks incomplete.