public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/46470] New: "add $0x8,%rsp" no longer optimized to pop
@ 2010-11-14 9:21 hubicka at gcc dot gnu.org
2010-11-16 17:07 ` [Bug target/46470] " rth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-11-14 9:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46470
Summary: "add $0x8,%rsp" no longer optimized to pop
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hubicka@gcc.gnu.org
Created attachment 22390
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22390
preprocessed testcase.
This is another cause of CSiBE regression at x86_64.
Mainline produces:
00000000000000f4 <yyerror>:
f4: 48 83 ec 08 sub $0x8,%rsp
f8: 48 89 fa mov %rdi,%rdx
fb: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 102
<yyerror+0xe>
102: be 00 00 00 00 mov $0x0,%esi
107: 31 c0 xor %eax,%eax
109: e8 00 00 00 00 callq 10e <yyerror+0x1a>
10e: 31 c0 xor %eax,%eax
110: 48 83 c4 08 add $0x8,%rsp
114: c3 retq
GCC 4.3 produces:
52: 48 83 ec 08 sub $0x8,%rsp
56: 48 89 fa mov %rdi,%rdx
59: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 60 <yyerror+0xe>
60: be 00 00 00 00 mov $0x0,%esi
65: 31 c0 xor %eax,%eax
67: e8 00 00 00 00 callq 6c <yyerror+0x1a>
6c: 31 c0 xor %eax,%eax
6e: 5a pop %rdx
6f: c3 retq
This is because CFA_ADJUST_CFA reg note is in the way now.
Richard, I think this is result of your changes, what would be best way to
handle this? I guess peephole2 can just move the note when it translates one
intstruction to one instruction. This however breaks because we want to split
up to 3 pops when doing -Os.
I guess also the epilogue code can just emit the pops directly. There always
should be free register available at this time.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/46470] "add $0x8,%rsp" no longer optimized to pop
2010-11-14 9:21 [Bug target/46470] New: "add $0x8,%rsp" no longer optimized to pop hubicka at gcc dot gnu.org
@ 2010-11-16 17:07 ` rth at gcc dot gnu.org
2010-11-16 22:29 ` rth at gcc dot gnu.org
2010-11-16 22:36 ` rth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rth at gcc dot gnu.org @ 2010-11-16 17:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46470
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.11.16 16:55:44
AssignedTo|unassigned at gcc dot |rth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Richard Henderson <rth at gcc dot gnu.org> 2010-11-16 16:55:44 UTC ---
Mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/46470] "add $0x8,%rsp" no longer optimized to pop
2010-11-14 9:21 [Bug target/46470] New: "add $0x8,%rsp" no longer optimized to pop hubicka at gcc dot gnu.org
2010-11-16 17:07 ` [Bug target/46470] " rth at gcc dot gnu.org
@ 2010-11-16 22:29 ` rth at gcc dot gnu.org
2010-11-16 22:36 ` rth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rth at gcc dot gnu.org @ 2010-11-16 22:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46470
--- Comment #2 from Richard Henderson <rth at gcc dot gnu.org> 2010-11-16 22:22:19 UTC ---
Author: rth
Date: Tue Nov 16 22:22:13 2010
New Revision: 166829
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166829
Log:
PR target/46470
* recog.c (peep2_attempt): Convert frame-related info when possible.
(peep2_fill_buffer): Allow frame-related insns into the buffer.
(peephole2_optimize): Allow peep2_attempt to fail.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr46470.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/recog.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/46470] "add $0x8,%rsp" no longer optimized to pop
2010-11-14 9:21 [Bug target/46470] New: "add $0x8,%rsp" no longer optimized to pop hubicka at gcc dot gnu.org
2010-11-16 17:07 ` [Bug target/46470] " rth at gcc dot gnu.org
2010-11-16 22:29 ` rth at gcc dot gnu.org
@ 2010-11-16 22:36 ` rth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rth at gcc dot gnu.org @ 2010-11-16 22:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46470
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2010-11-16 22:35:01 UTC ---
Fixed for mainline.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-16 22:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-14 9:21 [Bug target/46470] New: "add $0x8,%rsp" no longer optimized to pop hubicka at gcc dot gnu.org
2010-11-16 17:07 ` [Bug target/46470] " rth at gcc dot gnu.org
2010-11-16 22:29 ` rth at gcc dot gnu.org
2010-11-16 22:36 ` rth 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).