This is the mail archive of the gcc@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]

Re: Optimization problem on PPC when casting integers to floats


"Timothy J. Wood" <bungi@omnigroup.com> writes:

>   More important is the second problem.  When building the double on the =
> stack, there are two words, one that is constant throughout the loop and =
> one that needs to be updated for each value.  But, gcc doesn't realize =
> that it can avoid rewriting the constant part of the double on each =
> iteration of the loop and in most of the cases above, ends up issuing =
> twice as many store instructions as necessary.

[Working through my old mail...]

GCC doesn't have any code to perform the optimisation of
hoisting constant stores out of loops.  It can sink them, but in this
case that would make the code not work.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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