This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Measuring alignment
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: Measuring alignment
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 30 Mar 2000 10:49:31 -0700
- cc: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner), gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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