aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-07-28 11:52:55 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-07-28 11:52:55 +0000
commit9bc22d19f1fa7f65d5d50d3c44e8c9fbf7a8760b (patch)
treecfe6248e040ba11c2b973479a2f6e08561d5265b /gcc
parente47c403137a6c1de1676543d0bb031ec8cb4ecc4 (diff)
downloadgcc-9bc22d19f1fa7f65d5d50d3c44e8c9fbf7a8760b.zip
gcc-9bc22d19f1fa7f65d5d50d3c44e8c9fbf7a8760b.tar.gz
gcc-9bc22d19f1fa7f65d5d50d3c44e8c9fbf7a8760b.tar.bz2
match.pd: Re-order two cases in comparison with max/min value simplification to make it...
2015-07-28 Richard Biener <rguenther@suse.de> * match.pd: Re-order two cases in comparison with max/min value simplification to make it apply for bools. From-SVN: r226311
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/match.pd12
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 54a0da3..d81551f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-28 Richard Biener <rguenther@suse.de>
+
+ * match.pd: Re-order two cases in comparison with max/min
+ value simplification to make it apply for bools.
+
2015-07-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_rtx_arith_op_extract_p):
diff --git a/gcc/match.pd b/gcc/match.pd
index f431df5..5aaa8e1 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -1856,12 +1856,6 @@ along with GCC; see the file COPYING3. If not see
{ constant_boolean_node (true, type); })
(if (cmp == LT_EXPR)
(ne @2 @1))))
- (if (wi::eq_p (@1, max - 1))
- (switch
- (if (cmp == GT_EXPR)
- (eq @2 { wide_int_to_tree (TREE_TYPE (@1), wi::add (@1, 1)); }))
- (if (cmp == LE_EXPR)
- (ne @2 { wide_int_to_tree (TREE_TYPE (@1), wi::add (@1, 1)); }))))
(if (wi::eq_p (@1, min))
(switch
(if (cmp == LT_EXPR)
@@ -1872,6 +1866,12 @@ along with GCC; see the file COPYING3. If not see
{ constant_boolean_node (true, type); })
(if (cmp == GT_EXPR)
(ne @2 @1))))
+ (if (wi::eq_p (@1, max - 1))
+ (switch
+ (if (cmp == GT_EXPR)
+ (eq @2 { wide_int_to_tree (TREE_TYPE (@1), wi::add (@1, 1)); }))
+ (if (cmp == LE_EXPR)
+ (ne @2 { wide_int_to_tree (TREE_TYPE (@1), wi::add (@1, 1)); }))))
(if (wi::eq_p (@1, min + 1))
(switch
(if (cmp == GE_EXPR)