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]

Re: Measuring alignment



  In message <u8aejgnzi7.fsf@gromit.rhein-neckar.de>you write:
  > FAIL: gcc.c-torture/execute/memcpy-1.c compilation,  -O1 
  > WARNING: program timed out.
This and unsorted/memtst.c are both regressions with Richard's patch.

Richard -- did you run the testsuite?  If so, for what target?

I believe both problems are due to a problem in move_pieces_ninsns:
  if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
      || align > MOVE_MAX * BITS_PER_UNIT || align >= BIGGEST_ALIGNMENT)
    align = MOVE_MAX;

At some point align needs to be scaled by BITS_PER_UNIT since the value
passed in as well as MOVE_MAX is in bytes while later code assumes it is
in bits.

I also believe clear_by_pieces is buggy.

  if (! SLOW_UNALIGNED_ACCESS (word_mode, align)
      || align > MOVE_MAX * BITS_PER_UNIT || align >= BIGGEST_ALIGNMENT)
    align = MOVE_MAX * BITS_PER_UNIT;

Before we get to that statement is align supposed to be in bytes or bits?

Is align supposed to be in bits or bytes after that statement?

Now consider if it is bytes before the statement and bits afterwards.  Don't
we need to scale if that conditional is false?

Richard, can you please clean this up since it appears you broke this stuff?

jeff



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