genmatch.c (comparison_code_p): New predicate.
authorRichard Biener <rguenther@suse.de>
Wed, 1 Jun 2016 09:00:57 +0000 (09:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 1 Jun 2016 09:00:57 +0000 (09:00 +0000)
commite04d2a35c884f075ebe12cd6f871e35f6d0362a4
tree638943efbfc2fd09c79e79434b1bfd8ad43999e1
parente4b631a5a80b0fe254b3e9a747df697780748c12
genmatch.c (comparison_code_p): New predicate.

2016-06-01  Richard Biener  <rguenther@suse.de>

* genmatch.c (comparison_code_p): New predicate.
(swap_tree_comparison): New function.
(commutate): Add for_vec parameter to append new for entries.
Support commutating relational operators by swapping it alongside
operands.
(lower_commutative): Adjust.
(dt_simplify::gen): Do not pass artificial operators to gen
functions.
(decision_tree::gen): Do not add artificial operators as parameters.
(parser::parse_expr): Verify operator commutativity when :c is
applied.  Allow :C to override this.
* match.pd: Adjust patterns to use :C instead of :c where required.

From-SVN: r236977
gcc/ChangeLog
gcc/genmatch.c
gcc/match.pd