This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix for strct-pack-1.c regressions
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc-patches at gcc dot gnu dot org
- Date: 14 Mar 2002 12:01:58 +1100
- Subject: Re: fix for strct-pack-1.c regressions
- References: <10203131245.AA27361@vlsi1.ultra.nyu.edu> <20020313111601.F24360@redhat.com>
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
>> This is the one in gcc.c-torture/execute?
Yes, strct-pack-1.c
typedef struct
{
short s __attribute__ ((aligned(2), packed));
double d __attribute__ ((aligned(2), packed));
} TRIAL;
s and d end up sharing different bits of the same memory and
having to do ANDs/ORs to get the values in correctly.
The scheduler moves things around and ends up putting the store before
a load of the same memory:
z <= load from [x]
twiddle z's bits
z => store into [x]
the store is moved up before the load because we calculate wrong
dependence information.
> Yes. IIRC powerpc-eabi -mlittle showed the problem; Aldy
> can confirm the proper configuration.
powerpc-eabialtivec
-mlittle -mstrict-align -O[2s]
cheers
aldy