public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107445] New: Redundant moves for subregs move
@ 2022-10-27 22:50 juzhe.zhong at rivai dot ai
2022-10-27 22:58 ` [Bug target/107445] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2022-10-27 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107445
Bug ID: 107445
Summary: Redundant moves for subregs move
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: juzhe.zhong at rivai dot ai
Target Milestone: ---
Here is the testcase:
https://godbolt.org/z/4bcfx5a86
coalesce:
ld4d {z24.d - z27.d}, p0/z, [x0]
mov z5.d, z24.d
mov z4.d, z25.d
mov z3.d, z26.d
mov z2.d, z27.d
cmp w1, 0
ble .L2
mov w0, 0
ld1d z1.d, p0/z, [x2]
ld1d z0.d, p0/z, [x3]
.L3:
add w0, w0, 1
movprfx z5.d, p0/z, z5.d
mad z5.d, p0/m, z1.d, z0.d
movprfx z4.d, p0/z, z4.d
mad z4.d, p0/m, z1.d, z0.d
movprfx z3.d, p0/z, z3.d
mad z3.d, p0/m, z1.d, z0.d
movprfx z2.d, p0/z, z2.d
mad z2.d, p0/m, z1.d, z0.d
cmp w1, w0
bne .L3
It's obvious that we should be able to directly use z24 - z27 to perform mad
oberation and remove the redundant moves in the prologue.
I tried to implement register coalescing in IRA to fix it, but I am not sure
whether it's a good idea to fix it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/107445] Redundant moves for subregs move
2022-10-27 22:50 [Bug c/107445] New: Redundant moves for subregs move juzhe.zhong at rivai dot ai
@ 2022-10-27 22:58 ` pinskia at gcc dot gnu.org
2022-10-27 22:59 ` pinskia at gcc dot gnu.org
2022-10-27 23:00 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-27 22:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107445
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 53783
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53783&action=edit
testcase
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/107445] Redundant moves for subregs move
2022-10-27 22:50 [Bug c/107445] New: Redundant moves for subregs move juzhe.zhong at rivai dot ai
2022-10-27 22:58 ` [Bug target/107445] " pinskia at gcc dot gnu.org
@ 2022-10-27 22:59 ` pinskia at gcc dot gnu.org
2022-10-27 23:00 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-27 22:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107445
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Comment on attachment 53783
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53783
testcase
Compile at -march=armv8.8-a+sve -O3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/107445] Redundant moves for subregs move
2022-10-27 22:50 [Bug c/107445] New: Redundant moves for subregs move juzhe.zhong at rivai dot ai
2022-10-27 22:58 ` [Bug target/107445] " pinskia at gcc dot gnu.org
2022-10-27 22:59 ` pinskia at gcc dot gnu.org
@ 2022-10-27 23:00 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-27 23:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107445
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Exact dup of bug 106694.
*** This bug has been marked as a duplicate of bug 106694 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-27 23:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 22:50 [Bug c/107445] New: Redundant moves for subregs move juzhe.zhong at rivai dot ai
2022-10-27 22:58 ` [Bug target/107445] " pinskia at gcc dot gnu.org
2022-10-27 22:59 ` pinskia at gcc dot gnu.org
2022-10-27 23:00 ` 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).