This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19686] [4.0 Regression] loop performance decrease, not comparing against 0
- From: "andrewhutchinson at cox dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Feb 2005 23:06:42 -0000
- Subject: [Bug tree-optimization/19686] [4.0 Regression] loop performance decrease, not comparing against 0
- References: <20050129065037.19686.dmixm@marine.febras.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From andrewhutchinson at cox dot net 2005-02-06 23:06 -------
Taking X as the initial value of x on function entry.
The loop is defined as i=X to 0, step -1. Which is a simple do loop.
It gets "optimized" as i=0 to -X, step -1. (Which is something bizarre!)
The code increase is due to 1) Computation of -X and 2) compare said -X
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19686