Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-05-03 Thread Olivier Hainque
On May 3, 2012, at 12:24 , Richard Guenther wrote: >> One area of potential difference came to mind yesterday: regarding the >> processing of type alignment differences. VCE to more aligned (of the >> same size) would make a temp copy to yield a correctly aligned object. >> >> Would MEM_REF d

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-05-03 Thread Richard Guenther
On Thu, May 3, 2012 at 10:21 AM, Olivier Hainque wrote: > > On Apr 30, 2012, at 16:18 , Olivier Hainque wrote: >>> Can you formally relate those three representations and tell me why >>> VIEW_CONVERT_EXPR is useful (not only convenient because of less operands) >>> to use on lvalues (thus memory,

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-05-03 Thread Olivier Hainque
On Apr 30, 2012, at 16:18 , Olivier Hainque wrote: >> Can you formally relate those three representations and tell me why >> VIEW_CONVERT_EXPR is useful (not only convenient because of less operands) >> to use on lvalues (thus memory, compared to registers or constants)? > > I have ideas on how t

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-30 Thread Olivier Hainque
Hello Richard, Thanks for the constructive exchange :-) On Apr 26, 2012, at 10:48 , Richard Guenther wrote: >> In particular, I'm pretty sure that we can get component >> refs of integral modes that access a smaller range of bits >> than what the mode conveys. It is common with packing or >>

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-26 Thread Richard Guenther
On Wed, Apr 25, 2012 at 11:29 PM, Olivier Hainque wrote: > Thanks for your feedback Richard, > > On Apr 25, 2012, at 16:16 , Richard Guenther wrote: >> I think much better would be to simply disallow any toplevel >> VIEW_CONVERT_EXPR of BLKmode, > >> Does that fix your problems, too?  If so I pref

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-25 Thread Olivier Hainque
Thanks for your feedback Richard, On Apr 25, 2012, at 16:16 , Richard Guenther wrote: > I think much better would be to simply disallow any toplevel > VIEW_CONVERT_EXPR of BLKmode, > Does that fix your problems, too? If so I prefer that. Hmm, I think that this would fix the particular testscas

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 3:37 PM, Olivier Hainque wrote: > Hello, > > For the  "PA(1).Z := 44;" assignment in the attached Ada > testcase, we observe the gcc 4.5 SRA pass performing an > invalid transformation, turning: > >  struct { >    system__pack_48__bits_48 OBJ; >  } D.1432; > >  D.1432.OBJ =