This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/19686] [4.0 Regression] loop performance decrease, not comparing against 0


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]