public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/8776] loop invariants are not removed (most likely)
[not found] <20021201152600.8776.lomov1@yahoo.com>
@ 2003-06-04 19:50 ` dhazeghi@yahoo.com
2003-07-21 2:46 ` pinskia at physics dot uc dot edu
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-04 19:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8776
dhazeghi@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet| |i686-pc-linux-gnu
GCC host triplet| |i686-pc-linux-gnu
GCC target triplet| |i686-linux-pc-gnu
Last reconfirmed|0000-00-00 00:00:00 |2003-06-04 19:50:50
date| |
------- Additional Comments From dhazeghi@yahoo.com 2003-06-04 19:50 -------
Hello,
your problem as stated is fixed on gcc 3.3 branch and mainline. Please note that -O9 is the same
thing as -O3 (-On for n>3 is identical to -O3). Second, your code performs identically for me with
-O3, -O3 -DSLOW1 and -O3 -DSLOW2 with gcc 3.3. With gcc mainline, things are somewhat more
bizarre. With -O3, or -O3 -DSLOW1, the code is about 50% slower than with gcc 3.3, but with -O3
-DSLOW2 it's the same speed as gcc 3.3 (ie faster than the with the other two options). Very
strange.
Dara
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug optimization/8776] loop invariants are not removed (most likely)
[not found] <20021201152600.8776.lomov1@yahoo.com>
2003-06-04 19:50 ` [Bug optimization/8776] loop invariants are not removed (most likely) dhazeghi@yahoo.com
@ 2003-07-21 2:46 ` pinskia at physics dot uc dot edu
2003-11-15 20:47 ` [Bug optimization/8776] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-12-28 4:12 ` [Bug optimization/8776] " pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-21 2:46 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8776
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug optimization/8776] [3.4 Regression] loop invariants are not removed (most likely)
[not found] <20021201152600.8776.lomov1@yahoo.com>
2003-06-04 19:50 ` [Bug optimization/8776] loop invariants are not removed (most likely) dhazeghi@yahoo.com
2003-07-21 2:46 ` pinskia at physics dot uc dot edu
@ 2003-11-15 20:47 ` pinskia at gcc dot gnu dot org
2003-12-28 4:12 ` [Bug optimization/8776] " pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-15 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-15 20:47 -------
There is a preformance regression here from 3.3, other than that the -DSLOW[12] stuff is
fixed though, they alll preform the same.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |normal
Last reconfirmed|2003-06-04 19:50:50 |2003-11-15 20:47:31
date| |
Summary|loop invariants are not |[3.4 Regression] loop
|removed (most likely) |invariants are not removed
| |(most likely)
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8776
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug optimization/8776] loop invariants are not removed (most likely)
[not found] <20021201152600.8776.lomov1@yahoo.com>
` (2 preceding siblings ...)
2003-11-15 20:47 ` [Bug optimization/8776] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-12-28 4:12 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-28 4:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-28 03:56 -------
Here is the difference in the code:
--- temp.s Sat Dec 27 22:51:13 2003
+++ temp1.s Sat Dec 27 22:51:04 2003
@@ -5,21 +5,20 @@
.type main, @function
main:
pushl %ebp
- xorl %edx, %edx
+ movl $999999999, %eax
movl %esp, %ebp
subl $40, %esp
- leal -32(%ebp), %ecx
- movl $0, -16(%ebp)
+ leal -32(%ebp), %edx
andl $-16, %esp
- movl $0, -20(%ebp)
+ movl $0, -16(%ebp)
subl $16, %esp
+ movl $0, -20(%ebp)
movl $0, -24(%ebp)
- movl $999999999, %eax
.p2align 4,,15
.L5:
- movl $0, (%ecx,%edx,8)
+ movl $0, (%edx)
decl %eax
- movl $1072693248, 4(%ecx,%edx,8)
+ movl $1072693248, 4(%edx)
jns .L5
leave
xorl %eax, %eax
The main difference is the use of (%ecx,%edx,8) vs (%edx)
But this does not produce any difference in performance (at least on pentium 4 or
pentium 3):
tin:~/src/gnu/gcctest>time ./a.out
2.010u 0.000s 0:02.01 100.0% 0+0k 0+0io 69pf+0w
tin:~/src/gnu/gcctest>gcc -std=c99 -O3 pr8776.c -DSLOW2
tin:~/src/gnu/gcctest>!tim
time ./a.out
2.010u 0.000s 0:02.01 100.0% 0+0k 0+0io 69pf+0w
tin:~/src/gnu/gcctest>gcc -std=c99 -O3 pr8776.c -DSLOW1
tin:~/src/gnu/gcctest>!time
time ./a.out
2.010u 0.000s 0:02.01 100.0% 0+0k 0+0io 69pf+0w
So this is fixed on the mainline and 3.3.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Summary|[3.4 Regression] loop |loop invariants are not
|invariants are not removed |removed (most likely)
|(most likely) |
Target Milestone|3.4.0 |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8776
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-28 3:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20021201152600.8776.lomov1@yahoo.com>
2003-06-04 19:50 ` [Bug optimization/8776] loop invariants are not removed (most likely) dhazeghi@yahoo.com
2003-07-21 2:46 ` pinskia at physics dot uc dot edu
2003-11-15 20:47 ` [Bug optimization/8776] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-12-28 4:12 ` [Bug optimization/8776] " pinskia 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).