This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR tree-opt/38865 missing FRE with VIEW_CONVERT_EXPR


On Wed, Apr 22, 2009 at 10:52 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
> ?The issue here is that we have:
> ?sv_1(D)->i = { 0, 0, 0, 0 };
> ?D.1242_2 = VIEW_CONVERT_EXPR<vector float>(sv_1(D)->i);
>
> And FRE/PRE does not see that it could look through the VCE even
> though we could.
>
> This patch allows SCCVN to look through the VCE.
>
> OK? ?Bootstrapped and tested on i686-linux-gnu with no regressions.

The visit_reference_op_store parts look unnecessary, at least for
the testcases.  It also isn't obvious to me that we handle type
mismatches there (it is of course for the load case).

So, ok if you omit the visit_reference_op_store parts.

Thanks,
Richard.

> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree-ssa-sccvn.c (visit_reference_op_load): If vn_reference_lookup
> is returns NULL and OP is a VCE, look through the VCE.
> (visit_reference_op_store): Unwrap the VCE.
>
> * gcc.dg/tree-ssa/fre-vce-1.c: New testcase.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]