optimization bug
Jeffrey A Law
law@cygnus.com
Mon Sep 22 11:08:00 GMT 1997
In message < Pine.OSF.3.96.970922001305.6099A-100000@hepunix1.physics.yale.edu >you write:
> The problem shows up on an alpha-dec-osf4.0 with haifa schedule.
OK. You need to make sure to let us know this kind of information
when you make the initial bug report. It'll keep everyone from wasting
time.
> The RTL files t1.c.sched and t1.c.lreg are in the appendix.
>
> Note the INSN in t1.c.sched
> ======>(insn 88 4 15 (use (reg:DI 88)) -1 (nil)
> is changed in t1.c.lreg to
> ======>(insn 88 4 15 (use (const:DI (plus:DI (symbol_ref:DI ("pure"))
> which should not have happened.
>
> With this change, pseudo-reg 88 is never set, but it is used later which
> cause the program crash.
OK. This is also something you need to tell us when you send patches;
otherwise we have to figure these things out ourselves to determine
if your patch is correct.
Your patch is probably correct, though I want Jim's opinion on
one aspect.
Jim -- the problem is combine creates a use, but leaves reg_n_refs
as 2.
local-alloc handles reg_n_refs == 2 specially if the register is
equivalent to a constant (tries to replace references to the register
with the corresponding constant expression). In thise case there's
actually two insns that reference the reg as a source operand and
local-alloc substituted the constant expression in the wrong one
(ie the USE insn).
Should register references in USE insns be counted in reg_n_refs?
jeff
More information about the Gcc-bugs
mailing list