This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][match-and-simplify] More ternary commutative ops, canonicalize operand order before generic_simplify


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  <rguenther@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]