Gary Thomas: Code optimization bug in GCC-2.8 & EGCS
David Edelsohn
dje@watson.ibm.com
Fri Jan 30 22:47:00 GMT 1998
>>>>> Gary Thomas writes:
Gary> I spent many days trying to understand the "why" of this. I believe that
Gary> in CSE, follow jumps only works properly if loops have been appropriately
Gary> "marked" (which is what fails to happen in JUMP in this case). The CSE then
Gary> blindly optimizes away the first test (loop entry - above what should be
Gary> LOOP_VTOP). I found that turning off CSE follow jumps kept the problem
Gary> from generating *icorrect* code at the expense of generating *non-optimal* code.
Gary> Correctly identified loops seem to work OK. The failure here is that on the
Gary> PowerPC with signed characters, the loop exit code is "just a little too big."
If CSE does not handle unmarked loops properly then that is a bug
in CSE. For some sized loop, this always will fail.
David
More information about the Gcc
mailing list