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 they are

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 do that as

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 rep

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 hain...@adacore.com 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

fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-25 Thread Olivier Hainque
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 = D.1435; T1b.F = VIEW_CONVERT_EXPRstruct pt__point(D.1432); into:

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 hain...@adacore.com 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;  

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 testscase