]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/match.pd
fold-const.c (fold_binary_loc): Move bool_var != 0 -> bool_var and bool_var == 1...
authorRichard Biener <rguenther@suse.de>
Wed, 15 Jul 2015 12:25:57 +0000 (12:25 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 15 Jul 2015 12:25:57 +0000 (12:25 +0000)
commit55cf394666c6d7f7414e713ff6c3aa7cd9070d30
tree7143082c63e1d891da81c791a4f63d5f0b8bc17b
parentaa6cf07ea94c44e79b9473564b2a3bb818f820b4
fold-const.c (fold_binary_loc): Move bool_var != 0 -> bool_var and bool_var == 1 -> bool_var simplifications ...

2015-07-15  Richard Biener  <rguenther@suse.de>

* fold-const.c (fold_binary_loc): Move bool_var != 0 -> bool_var
and bool_var == 1 -> bool_var simplifications ...
* match.pd: ... to patterns here.  Factor out negate_expr_p
cases from the A - B -> A + (-B) patterns as negate_expr_p
predicate and add a -(A + B) -> (-B) - A pattern.

From-SVN: r225825
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd