public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95
@ 2005-07-19 19:20 danalis at cis dot udel dot edu
2005-07-19 19:53 ` [Bug rtl-optimization/22563] " danalis at cis dot udel dot edu
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: danalis at cis dot udel dot edu @ 2005-07-19 19:20 UTC (permalink / raw)
To: gcc-bugs
We ran bench++ to look for c++ samples that ran slower at -O3 with
gcc-[34].x than with gcc-2.95. We're attaching one such case,
minimized as far as we can (so it might not be testing the same
thing as the original code). It consists of a simple function that
accesses bitfields, called in a loop from main.
gcc-3.4.3/gcc-4.0.0/gcc-4.1-20050627 all produce binaries that seem
to be ten times slower on this than those produced by gcc-2.95.3.
All the compilers happily inlined
the function, which is fine.
Here's the code from the older compiler:
.L12:
movb $86,%dl
movb %dl,b_rec
movb %dl,%al
andb $7,%al
cmpb $6,%al
je .L14
call abort
.align 4
.L14:
andb $240,%dl
cmpb $80,%dl
je .L11
call abort
.align 4
.L11:
decl %ecx
testl %ecx,%ecx
jg .L12
And here's code from gcc-4.1-20050625:
jmp .L16
.p2align 4,,7
.L27:
andb $-16, %dl
cmpb $80, %dl
jne .L25
decl %ebx
je .L26
.L16:
movl %ecx, %eax
andl $-8, %eax
orl $6, %eax
movl %eax, b_rec
andb $-9, b_rec
movl b_rec, %eax
andl $-241, %eax
orl $80, %eax
movl %eax, b_rec
movl %eax, %ecx
movzbl b_rec, %edx
movb %dl, %al
andb $7, %al
cmpb $6, %al
je .L27
We'll attach the preprocessed source.
--
Summary: performance regression for gcc newer than 2.95
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danalis at cis dot udel dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/22563] performance regression for gcc newer than 2.95
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
@ 2005-07-19 19:53 ` danalis at cis dot udel dot edu
2005-07-19 19:57 ` [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: danalis at cis dot udel dot edu @ 2005-07-19 19:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danalis at cis dot udel dot edu 2005-07-19 19:20 -------
Created an attachment (id=9307)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9307&action=view)
reduced test
Is it bitchy to complain about few nanoseconds slowdown (per iteration) :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] performance regression for gcc newer than 2.95
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
2005-07-19 19:53 ` [Bug rtl-optimization/22563] " danalis at cis dot udel dot edu
@ 2005-07-19 19:57 ` pinskia at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-19 19:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-19 19:53 -------
There are a couple problems here, first we don't move the store to b_rec out side of the loop. Doing
that on the mainline, we remove the loop as it is now unswitchable and really just empty.
In fact that will not really be what you wantted but hey fast empty loops :).
The other issue is that we don't constant prop the constants as we have a BIT_FIELD_REF which is most
likely the cause of the orginal regression in the first place though BIT_FIELD_REF was there in 2.95.3.
We can reduce your testcase down to stores really but that might not help the orginal code (except for
the fact this is just a benchmark which is really useless).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |missed-optimization
Known to fail| |3.3.3 3.0.4 3.2.3 3.4.0
Known to work| |2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2005-07-19 19:53:16
date| |
Summary|performance regression for |[3.4/4.0/4.1 Regression]
|gcc newer than 2.95 |performance regression for
| |gcc newer than 2.95
Target Milestone|--- |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] performance regression for gcc newer than 2.95
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
2005-07-19 19:53 ` [Bug rtl-optimization/22563] " danalis at cis dot udel dot edu
2005-07-19 19:57 ` [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-08-04 19:16 ` danalis at cis dot udel dot edu
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-22 21:12 -------
Moving to 4.0.2 pre Mark.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.5 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] performance regression for gcc newer than 2.95
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
` (2 preceding siblings ...)
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
@ 2005-08-04 19:16 ` danalis at cis dot udel dot edu
2005-08-25 3:26 ` dann at godzilla dot ics dot uci dot edu
2005-09-27 15:59 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: danalis at cis dot udel dot edu @ 2005-08-04 19:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danalis at cis dot udel dot edu 2005-08-04 19:16 -------
For the record the reduced test case was derived from h000007.cpp of bench++
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] performance regression for gcc newer than 2.95
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
` (3 preceding siblings ...)
2005-08-04 19:16 ` danalis at cis dot udel dot edu
@ 2005-08-25 3:26 ` dann at godzilla dot ics dot uci dot edu
2005-09-27 15:59 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2005-08-25 3:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2005-08-25 02:49 -------
This message:
http://gcc.gnu.org/ml/gcc/2005-08/msg00208.html
was asking for the reason for the slowdown for S000005e
AFAICT the inner loop for the benchmark (in s000005e_test) gets compiled to:
.L153:
fstl (%edx)
leal 8(%edx), %eax
fstl (%eax)
fstl 8(%eax)
fstl 16(%eax)
fstl 24(%eax)
fstl 32(%eax)
fstl 40(%eax)
fstl 48(%eax)
leal 56(%eax), %edx
cmpl %edx, %ecx
jne .L153
and to:
.L9:
movl $0, (%edx)
movl $1074266112, 4(%edx)
movl $0, 8(%edx)
movl $1074266112, 12(%edx)
movl $0, 16(%edx)
movl $1074266112, 20(%edx)
movl $0, 24(%edx)
movl $1074266112, 28(%edx)
movl $0, 32(%edx)
movl $1074266112, 36(%edx)
movl $0, 40(%edx)
movl $1074266112, 44(%edx)
movl $0, 48(%edx)
movl $1074266112, 52(%edx)
movl $0, 56(%edx)
movl $1074266112, 60(%edx)
addl $64, %edx
cmpl %edx, %ebx
jne .L9
by 4.1
The 4.1 code looks much worse...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] performance regression for gcc newer than 2.95
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
` (4 preceding siblings ...)
2005-08-25 3:26 ` dann at godzilla dot ics dot uci dot edu
@ 2005-09-27 15:59 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 15:59 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22563
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <bug-22563-10914@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2005-11-03 22:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-19 19:20 [Bug rtl-optimization/22563] New: performance regression for gcc newer than 2.95 danalis at cis dot udel dot edu
2005-07-19 19:53 ` [Bug rtl-optimization/22563] " danalis at cis dot udel dot edu
2005-07-19 19:57 ` [Bug rtl-optimization/22563] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-08-04 19:16 ` danalis at cis dot udel dot edu
2005-08-25 3:26 ` dann at godzilla dot ics dot uci dot edu
2005-09-27 15:59 ` mmitchel at gcc dot gnu dot org
[not found] <bug-22563-10914@http.gcc.gnu.org/bugzilla/>
2005-10-27 0:20 ` pinskia at gcc dot gnu dot org
2005-10-31 4:12 ` mmitchel at gcc dot gnu dot org
2005-11-03 22:54 ` hubicka at gcc dot gnu dot 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).