This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc optimization improvement?
- To: gcc at gcc dot gnu dot org
- Subject: gcc optimization improvement?
- From: Ralph Doncaster <ralph at laratech dot ca>
- Date: Thu, 27 Jan 2000 16:16:58 -0500
- Organization: Lara Technology
Hi,
I was reading the following page:
http://gcc.gnu.org/news/hoist.html
And I was thinking that the listed source is still not optimal.
incl %edx # Increment i
cmpl %ecx,%edx # Test i < j
jl .L5 # Loop if i < j
if j is assigned to i (edx) before the loop, then couldn't the above be
reduced to a decrement and branch if not zero? (my old x86 assembly
book is not handy, but I'm pretty sure there is a jne or something like
that)
-Ralph