This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: wrong codegen from gcse2


The postreload gcse assigns temporary CUID's starting with 0.
The trouble with that is the test for whether a register has been
stored to already is

        /* Reg X is not set before INSN in the current basic block if
           we have not yet recorded the CUID of an insn that touches
           the reg.  */
        return reg_avail_info[REGNO (x)] == 0;

which does not get the right answer for CUID 0, the first insn in
the function.  I don't have a test that fails in mainline, but the
potential for breakage is obvious.  The fix is to start numbering
CUIDs at 1 (I've checked that they're never used to index an array).
OK with testing?

2005-07-21 Dale Johannesen <dalej@apple.com>

* postreload-gcse.c (alloc_mem): Start CUID numbering at 1.

Attachment: diffs3.txt
Description: Text document



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]