miscompiled loop condition

Bernd Schmidt bernds@pathia.cygnus.co.uk
Tue Nov 30 03:44:00 GMT 1999


> Maybe I'm missing something, but if you stop replacing when you hit a
> label (end of extended basic block), what happens to uses *after* that point?

They won't get replaced, and the initializing insn should not be deleted.
The two new variables keep track of whether the initializing insn had the
first occurrence of the replaced reg, and whether the last use we replaced
was the last occurrence of the reg.  Only if both conditions are true will
the initializing insn be deleted.

[It turns out there's another bug; we can't use REGNO_FIRST/LAST_UID on all
registers; if the replaced reg was made by the loop optimizer itself we'll
get crashes.  This occurs both with and without the patch we are currently
discussing.  I think I'm going to fix this kind of thing once and for all
by biting the bullet and doing reg_scan updates in between loop passes.]

Bernd



More information about the Gcc-bugs mailing list