------- Comment #5 from rguenth at gcc dot gnu dot org  2008-11-02 12:04 -------
More reduced:

typedef int Int32;
void use_it(int);
void FindAndReadSignature(int processedSize)
{
    int numPrevBytes = 1;
    for (;;)
      {
        int numBytesInBuffer = numPrevBytes + processedSize;
        Int32 numTests = numBytesInBuffer - 1;
        use_it (numTests);
        numPrevBytes = numBytesInBuffer - numTests;
      }
}

to not oscillate we rely on numTests _not_ be varying.  It happens to be
with the typedef as we forget to strip useless conversions.  Otherwise
we oscillate numPrevBytes (loop entry vs. back edge) between 1 and varying.

Which may hint at that the speedup brought up by Danny (not processing a
use further if it got varying) is even a correctness thing...

I have a patch for this particular case.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37991

Reply via email to