------- Comment #16 from rguenther at suse dot de 2008-06-22 22:23 -------
Subject: Re: [4.4 Regression] FAIL:
gcc.c-torture/execute/20040709-1.c execution at -O2 and above
On Sun, 22 Jun 2008, dave at hiauly1 dot hia dot nrc dot ca wrote:
>
>
> ------- Comment #15 from dave at hiauly1 dot hia dot nrc dot ca 2008-06-22
> 21:34 -------
> Subject: Re: [4.4 Regression] FAIL: gcc.c-torture/execute/20040709-1.c
> execution at -O2 and above
>
> > > x$B0F7_8 = BIT_FIELD_REF <x, 7, 0>;
> > > D.1258.i ={v} x$i_5;
> > > D.1258.j ={v} x$j_7;
> > > SR.12_9 = x$B0F7_8 >> 1;
> > > BIT_FIELD_REF <D.1258, 7, 0> ={v} SR.12_9;
> > > return D.1258;
>
> > Well, SRA is broken (cost-wise at least) since lxos changes.
>
> Why the shift? It seems incorrect.
It looks like it is only assigning the 6-bit part of the k, l
combination. Is the above after the SRA pass in question or after
some more optimizations?
Eventually this is a bit-field-ref vs. BITS_BIG_ENDIAN/BYTES_BIG_ENDIAN
issue -- it was never clear to me how the bit-field position in
a bit-field-ref relates to those.
> SRA also seems to be manipulating the k and l fields together for
> some reason. Why not all the fields since K is packed and the total
> bit length is less than a word?
The cost metric is of course simply broken.
I'll try to investigate at some point with a cross.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35518