This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR tree-opt/38865 missing FRE with VIEW_CONVERT_EXPR
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Apr 2009 11:00:38 +0200
- Subject: Re: [PATCH] Fix PR tree-opt/38865 missing FRE with VIEW_CONVERT_EXPR
- References: <de8d50360904221352l1b8de633uff8159007826db98@mail.gmail.com>
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.
>