On Fri, Mar 20, 2015 at 12:38:51PM +0100, Richard Biener wrote:
> 
> This removes a road-block towards fixing PR64715 - the gimplifier
> performing an undesired "simplification" of &X + CST to
> &MEM[&X, CST].  IMHO this is premature there.
> 
> The fallout is small - two testcases are no longer simplified at -O0
> (who cares), and devirt-40.C shows that SCEV adheres too closely
> to the fold view of type compatibility (I had a fix for that in
> my dev tree for quite some time it seeems).  Of course the latter
> means that there might be more fallout in code that builds
> GENERIC and then re-gimplifies that, but I can't think of anything
> that wouldn't be fixed with followup passes.
> 
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> 
> Ok?

LGTM.

> 2015-03-20  Richard Biener  <rguent...@suse.de>
> 
>       PR middle-end/64715
>       * tree-chrec.c (chrec_fold_poly_cst): Use useless_type_conversion_p
>       for type comparison and gcc_checking_assert.
>       (chrec_fold_plus_poly_poly): Likewise.
>       (chrec_fold_multiply_poly_poly): Likewise.
>       (chrec_convert_1): Likewise.
>       * gimplify.c (gimplify_expr): Remove premature folding of
>       &X + CST to &MEM[&X, CST].
> 
>       * gcc.dg/pr15347.c: Use -O.
>       * c-c++-common/pr19807-1.c: Likewise.

        Jakub

Reply via email to