public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113328] New: Some fixed length vector constants can be generated using SVE index instruction
@ 2024-01-11 7:36 pinskia at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: pinskia at gcc dot gnu.org @ 2024-01-11 7:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113328
Bug ID: 113328
Summary: Some fixed length vector constants can be generated
using SVE index instruction
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Target: aarch64-linux-gnu
Take:
```
int test(int array[4]);
int foo(int value)
{
int array[4];
for (int i = 0; i < 4; i++)
array[i] = i;
return test(array);
}
```
With `-O3 -march=armv8.4-a+sve` this currently generates:
```
stp x29, x30, [sp, -32]!
adrp x0, .LC0
mov x29, sp
ldr q31, [x0, #:lo12:.LC0]
add x0, sp, 16
str q31, [sp, 16]
bl test
ldp x29, x30, [sp], 32
ret
```
But we should be able to produce:
```
stp x29, x30, [sp, -32]!
mov x29, sp
index z31.s, #0, #1
add x0, sp, 16
str q31, [sp, 16]
bl test
ldp x29, x30, [sp], 32
ret
```
I noticed that while looking into PR 113326.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-11 7:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 7:36 [Bug target/113328] New: Some fixed length vector constants can be generated using SVE index instruction pinskia at gcc dot gnu.org
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).