This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Allow tree-ssa Forward Prop to produce VIEW_CONVERT_EXPR in some cases
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 Jul 2010 08:54:29 -0700
- Subject: Re: [PATCH] Allow tree-ssa Forward Prop to produce VIEW_CONVERT_EXPR in some cases
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
On Sun, May 4, 2008 at 9:40 PM, Andrew Pinski <firstname.lastname@example.org> wrote:
> On Fri, May 2, 2008 at 4:12 AM, Andrew Pinski <email@example.com> wrote:
>> ?Hmm, yes to both the above. ?Guess I have to look more into this than
>> ?just that. ?I will add both of these testcases.
> So there was a change between 4.1.1 and the trunk I did not notice
> until now which caused volatile checks needed to be added. ?Before in
> 4.1.1, we used to not look at volatile use statements but now on the
> trunk we do.
>> ?> ?Also if you cannot use fold_build1 because of the invalid gimple issue,
>> ?> ?won't you run into this problem with fold_stmt as well?
>> ?For some reason fold_stmt does not change it, I think it tries but
>> ?rejects it as invalid gimple.
> Here is the new patch which fixes all three problems; we also fold the
> VCE now and regimplify the statement when needed.
> OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
> Andrew Pinski
> * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): If we have the
> same size types for the indirect reference on the rhs, then create a VCE.
> * gcc.dg/tree-ssa/forwprop-5.c: New testcase.
> * gcc.dg/tree-ssa/forwprop-6.c: New testcase.
> * gcc.dg/tree-ssa/forwprop-7.c: New testcase.
> * gcc.dg/tree-ssa/forwprop-8.c: New testcase.
> * gcc.dg/tree-ssa/forwprop-9.c: New testcase.