* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
@ 2021-04-14 13:14 ` belagod at gcc dot gnu.org
2021-04-15 10:57 ` belagod at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: belagod at gcc dot gnu.org @ 2021-04-14 13:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
Tejas Belagod <belagod at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |belagod at gcc dot gnu.org
--- Comment #1 from Tejas Belagod <belagod at gcc dot gnu.org> ---
Small correction - the sequence translates to
umov w0, v0.b[1]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
2021-04-14 13:14 ` [Bug target/96339] " belagod at gcc dot gnu.org
@ 2021-04-15 10:57 ` belagod at gcc dot gnu.org
2021-10-06 11:51 ` prathamesh3492 at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: belagod at gcc dot gnu.org @ 2021-04-15 10:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
Tejas Belagod <belagod at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |12.0
Last reconfirmed| |2021-04-15
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
2021-04-14 13:14 ` [Bug target/96339] " belagod at gcc dot gnu.org
2021-04-15 10:57 ` belagod at gcc dot gnu.org
@ 2021-10-06 11:51 ` prathamesh3492 at gcc dot gnu.org
2021-10-07 11:24 ` belagod at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: prathamesh3492 at gcc dot gnu.org @ 2021-10-06 11:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
prathamesh3492 at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |prathamesh3492 at gcc dot gnu.org
--- Comment #2 from prathamesh3492 at gcc dot gnu.org ---
(In reply to Tejas Belagod from comment #1)
> Small correction - the sequence translates to
> umov w0, v0.b[1]
Hi Tejas,
Are you still working on this PR ? If not, can I assign it to myself ?
Thanks,
Prathamesh
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-06 11:51 ` prathamesh3492 at gcc dot gnu.org
@ 2021-10-07 11:24 ` belagod at gcc dot gnu.org
2021-10-07 11:26 ` prathamesh3492 at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: belagod at gcc dot gnu.org @ 2021-10-07 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
--- Comment #3 from Tejas Belagod <belagod at gcc dot gnu.org> ---
> Are you still working on this PR ? If not, can I assign it to myself ?
Yes I am - its almost done - just been busy with a few higher priority things.
I'll find some time to clean it up, test it and post it soon. Just curious - is
there some urgency for this fix?
Thanks,
Tejas.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
` (3 preceding siblings ...)
2021-10-07 11:24 ` belagod at gcc dot gnu.org
@ 2021-10-07 11:26 ` prathamesh3492 at gcc dot gnu.org
2022-05-06 8:30 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: prathamesh3492 at gcc dot gnu.org @ 2021-10-07 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
--- Comment #4 from prathamesh3492 at gcc dot gnu.org ---
(In reply to Tejas Belagod from comment #3)
> > Are you still working on this PR ? If not, can I assign it to myself ?
>
> Yes I am - its almost done - just been busy with a few higher priority
> things. I'll find some time to clean it up, test it and post it soon. Just
> curious - is there some urgency for this fix?
>
> Thanks,
> Tejas.
Hi Tejas,
Thanks for the heads up. No urgency, I was just looking around for missed
optimizations related to SVE in the bugzilla ;-)
Thanks,
Prathamesh
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
` (4 preceding siblings ...)
2021-10-07 11:26 ` prathamesh3492 at gcc dot gnu.org
@ 2022-05-06 8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
` (5 preceding siblings ...)
2022-05-06 8:30 ` jakub at gcc dot gnu.org
@ 2023-05-08 12:21 ` rguenth at gcc dot gnu.org
2023-06-13 7:04 ` cvs-commit at gcc dot gnu.org
2023-06-13 7:07 ` belagod at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
` (6 preceding siblings ...)
2023-05-08 12:21 ` rguenth at gcc dot gnu.org
@ 2023-06-13 7:04 ` cvs-commit at gcc dot gnu.org
2023-06-13 7:07 ` belagod at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-13 7:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tejas Belagod <belagod@gcc.gnu.org>:
https://gcc.gnu.org/g:22d85c10a004f4f5eaf6b68b62a0792faf048bf8
commit r14-1744-g22d85c10a004f4f5eaf6b68b62a0792faf048bf8
Author: Tejas Belagod <tbelagod@arm.com>
Date: Tue May 11 11:09:03 2021 +0100
AArch64: [PR96339] Optimise svlast[ab]
This PR optimizes an SVE intrinsics sequence where
svlasta (svptrue_pat_b8 (SV_VL1), x)
a scalar is selected based on a constant predicate and a variable vector.
This sequence is optimized to return the correspoding element of a NEON
vector. For eg.
svlasta (svptrue_pat_b8 (SV_VL1), x)
returns
umov w0, v0.b[1]
Likewise,
svlastb (svptrue_pat_b8 (SV_VL1), x)
returns
umov w0, v0.b[0]
This optimization only works provided the constant predicate maps to a
range
that is within the bounds of a 128-bit NEON register.
gcc/ChangeLog:
PR target/96339
* config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::fold):
Fold sve
calls that have a constant input predicate vector.
(svlast_impl::is_lasta): Query to check if intrinsic is svlasta.
(svlast_impl::is_lastb): Query to check if intrinsic is svlastb.
(svlast_impl::vect_all_same): Check if all vector elements are
equal.
gcc/testsuite/ChangeLog:
PR target/96339
* gcc.target/aarch64/sve/acle/general-c/svlast.c: New.
* gcc.target/aarch64/sve/acle/general-c/svlast128_run.c: New.
* gcc.target/aarch64/sve/acle/general-c/svlast256_run.c: New.
* gcc.target/aarch64/sve/pcs/return_4.c (caller_bf16): Fix asm
to expect optimized code for function body.
* gcc.target/aarch64/sve/pcs/return_4_128.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_4_256.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_4_512.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_4_1024.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_4_2048.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_5.c (caller_bf16): Likewise.
* gcc.target/aarch64/sve/pcs/return_5_128.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_5_256.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_5_512.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_5_1024.c (caller_bf16):
Likewise.
* gcc.target/aarch64/sve/pcs/return_5_2048.c (caller_bf16):
Likewise.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/96339] [SVE] Optimise svlast[ab]
2020-07-27 16:22 [Bug target/96339] New: [SVE] Optimise svlast[ab] rsandifo at gcc dot gnu.org
` (7 preceding siblings ...)
2023-06-13 7:04 ` cvs-commit at gcc dot gnu.org
@ 2023-06-13 7:07 ` belagod at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: belagod at gcc dot gnu.org @ 2023-06-13 7:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96339
Tejas Belagod <belagod at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Target Milestone|12.4 |14.0
--- Comment #9 from Tejas Belagod <belagod at gcc dot gnu.org> ---
Now fixed on master.
^ permalink raw reply [flat|nested] 10+ messages in thread