This is the mail archive of the 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 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


2014-10-16  Richard Biener  <>

	* 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


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