This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][17/n] Merge from match-and-simplify, plus/minus association patterns
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Nov 2014 09:55:24 -0800
- Subject: Re: [PATCH][17/n] Merge from match-and-simplify, plus/minus association patterns
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1411111410060 dot 374 at zhemvz dot fhfr dot qr>
On Tue, Nov 11, 2014 at 5:13 AM, Richard Biener <rguenther@suse.de> wrote:
>
> This merges patterns from associate_plusminus and adjusts them with
> details from their fold-const.c pendants. It also fixes missing
> flag_sanitize checks on negate contraction on the way.
>
> This shows places where folds STRIP_NOPs was important (but also
> shows where it may create wrong code - sth the patch doesn't fix
> yet). Without the conditonal convert handling on the negate
> contraction we regress quite a few GENERIC folding testcases.
>
> Note that the other explicit reassocation patterns are handled
> by folds associate: piece which I am sure we don't implement
> fully by the few patterns (OTOH on GIMPLE we have a reassoc
> pass for that anyway). So not too many patterns were removed
> from fold.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
>
> Richard.
>
> 2014-11-11 Richard Biener <rguenther@suse.de>
>
> * match.pd: Implement patterns from associate_plusminus
> and factor in differences from the fold-const.c implementation.
> * fold-const.c (fold_binary_loc): Remove patterns here.
> * tree-ssa-forwprop.c (associate_plusminus): Remove.
> (pass_forwprop::execute): Don't call it.
> * tree.c (tree_nop_conversion_p): New function, factored
> from tree_nop_conversion.
> * tree.h (tree_nop_conversion_p): Declare.
>
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63836
H.J.