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: Richard Biener <rguenther at suse dot de>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Oct 2014 09:56:37 +0200 (CEST)
- 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> <54403F8A dot 60407 at redhat dot com>
On Thu, 16 Oct 2014, Jeff Law wrote:
> On 10/16/14 05:06, Richard Biener wrote:
> > 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
> > x86_64-unknown-linux-gnu.
> > Richard.
> > 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
> > and FMA_EXPR.
> Seems like something we'd want for the trunk independent of the
> match-and-simplify work
Yes, I am going to test and apply it there today.