optimization/732: Code generation bug on alpha 21264 at -O2

Brad Lucier lucier@math.purdue.edu
Thu Nov 9 13:16:00 GMT 2000


I'm trying to track down the reason for the failure

http://gcc.gnu.org/ml/gcc-prs/2000-q4/msg00208.html

which doesn't happen with gcc-2.95.1, so I'm looking through the
record of patches for gcse.c.

There is this patch:

Revision 1.79 / (download) - annotate - [select for diffs] , Tue Feb 29 20:08:52 2000 UTC (8 months, 1 week ago) by kenner 
Branch: MAIN 
Changes since 1.78: +833 -960 lines
Diff to previous 1.78 (colored) 

        * gcse.c: Cleanups throughout: mostly white-space, but also
        some minor rearrangement of code.


which makes the following change (among many others):

The new code (which remains in gcse.c) is:

/* Called from compute_sets via note_stores to handle one SET or CLOBBER in
   an insn.  The DATA is really the instruction in which the SET is
   occurring.  */

static void
record_set_info (dest, setter, data)
     rtx dest, setter ATTRIBUTE_UNUSED;
     void *data;
{
  rtx record_set_insn = (rtx) data;

  if (GET_CODE (dest) == REG && REGNO (dest) >= FIRST_PSEUDO_REGISTER)
    record_one_set (REGNO (dest), record_set_insn);
}

The previous code was:

/* Called from compute_sets via note_stores to handle one
   SET or CLOBBER in an insn.  The DATA is really the instruction
   in which the SET is occurring.  */

static void
record_set_info (dest, setter, data)
     rtx dest, setter ATTRIBUTE_UNUSED;
     void *data;
{
  rtx record_set_insn = (rtx) data;

  if (GET_CODE (dest) == SUBREG)
    dest = SUBREG_REG (dest);

  if (GET_CODE (dest) == REG)
    {
      if (REGNO (dest) >= FIRST_PSEUDO_REGISTER)
        record_one_set (REGNO (dest), record_set_insn);
    }
}


So the new code doesn't deal with SUBREGs.

Is this correct?

Brad Lucier


More information about the Gcc-patches mailing list