public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth
@ 2021-05-01 19:30 luc.vanoostenryck at gmail dot com
2021-05-02 2:17 ` [Bug target/100378] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: luc.vanoostenryck at gmail dot com @ 2021-05-01 19:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Bug ID: 100378
Summary: [Regression 9/10/11/12] arm64: lsl + asr used instead
of sxth
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: luc.vanoostenryck at gmail dot com
Target Milestone: ---
Created attachment 50727
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50727&action=edit
testcase
On arm64, when compiling with optimization, for example with -O2,
the following code:
struct sh {
short a;
short b;
short y[2];
};
int fooh(struct sh s) { return s.a; }
produces the following assembly code since GCC9.x:
fooh:
lsl x0, x0, 16
asr w0, w0, 16
ret
but with GCC8.x and before it produces the shorter:
fooh(sh):
sxth w0, w0
ret
See https://gcc.godbolt.org/z/YrW7E3cro
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [9/10/11/12 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
@ 2021-05-02 2:17 ` pinskia at gcc dot gnu.org
2021-05-02 2:32 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-02 2:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[Regression 9/10/11/12] |[9/10/11/12 Regression]
|arm64: lsl + asr used |arm64: lsl + asr used
|instead of sxth |instead of sxth
Target Milestone|--- |12.0
Keywords| |missed-optimization
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [9/10/11/12 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
2021-05-02 2:17 ` [Bug target/100378] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2021-05-02 2:32 ` pinskia at gcc dot gnu.org
2021-05-03 8:02 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-02 2:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-05-02
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Trying 2 -> 6:
2: r94:DI=r96:DI
REG_DEAD r96:DI
6: r95:SI=sign_extend(r94:DI#0)
REG_DEAD r94:DI
Failed to match this instruction:
(set (reg:SI 95 [ s ])
(ashiftrt:SI (subreg:SI (ashift:DI (reg:DI 96)
(const_int 16 [0x10])) 0)
(const_int 16 [0x10])))
So what is happening is now combine is inserting an extra mov from x0 to a new
register 96 and when it does the combine, it does it badly not into what it was
before:
(insn 6 3 11 2 (set (reg:SI 95 [ s ])
(sign_extend:SI (subreg:HI (reg/v:DI 94 [ s ]) 0))) "t8877.c":6:37 111
{*extendhisi2_aarch64}
(expr_list:REG_DEAD (reg/v:DI 94 [ s ])
(nil)))
Confirmed. I thought there was a dup of this bug somewhere but I cannot find
it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [9/10/11/12 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
2021-05-02 2:17 ` [Bug target/100378] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-05-02 2:32 ` pinskia at gcc dot gnu.org
@ 2021-05-03 8:02 ` rguenth at gcc dot gnu.org
2021-06-01 8:20 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-03 8:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |9.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [9/10/11/12 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
` (2 preceding siblings ...)
2021-05-03 8:02 ` rguenth at gcc dot gnu.org
@ 2021-06-01 8:20 ` rguenth at gcc dot gnu.org
2022-01-20 13:56 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [9/10/11/12 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
` (3 preceding siblings ...)
2021-06-01 8:20 ` rguenth at gcc dot gnu.org
@ 2022-01-20 13:56 ` rguenth at gcc dot gnu.org
2022-05-27 9:45 ` [Bug target/100378] [10/11/12/13 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-20 13:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [10/11/12/13 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
` (4 preceding siblings ...)
2022-01-20 13:56 ` rguenth at gcc dot gnu.org
@ 2022-05-27 9:45 ` rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug target/100378] [11/12/13/14 " rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [10/11/12/13 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
` (5 preceding siblings ...)
2022-05-27 9:45 ` [Bug target/100378] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug target/100378] [11/12/13/14 " rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/100378] [11/12/13/14 Regression] arm64: lsl + asr used instead of sxth
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
` (6 preceding siblings ...)
2022-06-28 10:44 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:39 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100378
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-07-07 10:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 19:30 [Bug rtl-optimization/100378] New: [Regression 9/10/11/12] arm64: lsl + asr used instead of sxth luc.vanoostenryck at gmail dot com
2021-05-02 2:17 ` [Bug target/100378] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-05-02 2:32 ` pinskia at gcc dot gnu.org
2021-05-03 8:02 ` rguenth at gcc dot gnu.org
2021-06-01 8:20 ` rguenth at gcc dot gnu.org
2022-01-20 13:56 ` rguenth at gcc dot gnu.org
2022-05-27 9:45 ` [Bug target/100378] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug target/100378] [11/12/13/14 " rguenth 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).