This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][match-and-simplify] More ternary commutative ops, canonicalize operand order before generic_simplify
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 16 Oct 2014 15:58:34 -0600
- Subject: Re: [PATCH][match-and-simplify] More ternary commutative ops, canonicalize operand order before generic_simplify
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1410161304060 dot 20733 at zhemvz dot fhfr dot qr>
On 10/16/14 05:06, Richard Biener wrote:
Seems like something we'd want for the trunk independent of the
This patch (also applicable to trunk) makes us canoncialize operand
order for comparisons at the same time we canonicalize other
operand order, in particular before dispatching to generic_simplify.
It also adds operand canonicalization to ternary ops and adds
FMA_EXPR and DOT_PROD_EXPR to the list of ternary commutative ops.
Bootstrap and regtest running on match-and-simplify branch and
2014-10-16 Richard Biener <firstname.lastname@example.org>
* fold-const.c (fold_comparison): Remove redundant constant
folding and operand swapping.
(fold_binary_loc): Do comparison operand swapping here,
dispatch to generic_simplify after operand canonicalization.
(fold_ternary_loc): Canonicalize operand order for
commutative ternary operations.
* tree.c (commutative_ternary_tree_code): Add DOT_PROD_EXPR