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  <rguent...@suse.de>
> > 
> >     * 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.

Thanks,
Richard.

Reply via email to