Stabilization on the ARM: an unrolling bug

Michael Hayes m.hayes@elec.canterbury.ac.nz
Thu Jan 7 19:34:00 GMT 1999


Michael Hayes writes:

 > Uggg, this loop generates horrible RTL that has probably confused the
 > loop unrolling code.  The loop doesn't have a virtual top so to the
 > loop unrolling code if doesn't look like a normal for-loop.
 > IMO, it would be easier for the loop optimisation code if a virtual
 > top was always generated for a for-loop, say when optimising.

This loop raises some interesting issues.  

1. It has two back edges which has confused the loop iteration
calculating code since it only found the second back edge. 

2. The number of iterations is loop-invariant so we need some
code to detect this.

3. If we are not optimising for size, it is probably best to have a
virtual top so we know that the loop body will iterate at least once.

Finally, I wonder what triggered the problem; I don't think it was the
couple of pepples I dislodged a couple of months ago?

Michael.



More information about the Gcc-bugs mailing list