public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113027] New: aarch64 is missing vec_set and vec_extract for structure modes
@ 2023-12-14 22:44 rsandifo at gcc dot gnu.org
2024-02-05 22:11 ` [Bug target/113027] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-12-14 22:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113027
Bug ID: 113027
Summary: aarch64 is missing vec_set and vec_extract for
structure modes
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: rsandifo at gcc dot gnu.org
Target Milestone: ---
The lack of vec_set and vec_extract optabs for structure modes means that the
following testcase spills to the stack when compiled at -O2:
#include <arm_neon.h>
float64x2x2_t f1 (float64x2x2_t x) { x.val[0][1] += 1.0; return x; }
float64x2x3_t f2 (float64x2x3_t x) { x.val[0][0] = x.val[1][1] + x.val[2][0];
return x; }
float64x2x4_t f3 (float64x2x4_t x) { x.val[0][0] = x.val[1][1] + x.val[2][0] -
x.val[3][1]; return x; }
For example:
f1:
sub sp, sp, #32
fmov d31, 1.0e+0
st1 {v0.2d - v1.2d}, [sp]
ldr d30, [sp, 8]
fadd d31, d31, d30
str d31, [sp, 8]
ld1 {v0.2d - v1.2d}, [sp]
add sp, sp, 32
ret
With the extra patterns, we instead get:
f1:
dup d31, v0.d[1]
fmov d30, 1.0e+0
fadd d30, d31, d30
ins v0.d[1], v30.d[0]
ret
f2:
dup d31, v1.d[1]
fadd d31, d31, d2
ins v0.d[0], v31.d[0]
ret
f3:
dup d31, v1.d[1]
dup d30, v3.d[1]
fadd d31, d31, d2
fsub d30, d31, d30
ins v0.d[0], v30.d[0]
ret
Fixing this might also make it possible to use structure modes for arrays (c.f.
PR109543).
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/113027] aarch64 is missing vec_set and vec_extract for structure modes
2023-12-14 22:44 [Bug target/113027] New: aarch64 is missing vec_set and vec_extract for structure modes rsandifo at gcc dot gnu.org
@ 2024-02-05 22:11 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-05 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113027
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2024-02-05
Status|UNCONFIRMED |NEW
Severity|normal |enhancement
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-05 22:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 22:44 [Bug target/113027] New: aarch64 is missing vec_set and vec_extract for structure modes rsandifo at gcc dot gnu.org
2024-02-05 22:11 ` [Bug target/113027] " 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).