This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument
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 at
hand but not quite the underlying issue I was aiming at.
The basic problem I am trying to address is SRA turning
VCE (<some access>) into VCE (<scalar>) where the replacement
<scalar> is of a different size than <some access>.
The idea of locating the check in create_access is that
this is where the <access> size is computed.
I'm pretty sure that excluding just on BLKmode for
TYPE(<access>) doesn't catch them all.
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 clauses in Ada.
I'll see if I can come up with a case tomorrow.
I'm actually also slightly confused by the processing of
VCE inputs in SRA, as VCE (<composite>) and VCE (<scalar>)
are not supposed to result in the same outcome for identical
bit size and patterns on big endian. But I might just still
be missing something here.
Olivier