aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-12-01 08:52:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-12-01 08:52:58 +0000
commit287f8f17f22c829b7952d205e4b6793d073e486d (patch)
tree482a424d5f60ee0964183bb8a70f29849b3b5144
parenta6c5361c08c88e0db15bec581813b8910ba62116 (diff)
downloadgcc-287f8f17f22c829b7952d205e4b6793d073e486d.zip
gcc-287f8f17f22c829b7952d205e4b6793d073e486d.tar.gz
gcc-287f8f17f22c829b7952d205e4b6793d073e486d.tar.bz2
re PR ada/68590 (FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check")
2015-12-01 Richard Biener <rguenther@suse.de> PR middle-end/68590 * match.pd: Merge (eq @0 @0) and (ge/le @0 @0) patterns. From-SVN: r231100
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/match.pd13
2 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c111453..800645a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-01 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/68590
+ * match.pd: Merge (eq @0 @0) and (ge/le @0 @0) patterns.
+
2015-12-01 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (type_with_linkage_p, type_in_anonymous_namespace_p,
diff --git a/gcc/match.pd b/gcc/match.pd
index e86cc8b..ea512fb 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -1828,15 +1828,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
/* Simplify comparison of something with itself. For IEEE
floating-point, we can only do some of these simplifications. */
-(simplify
- (eq @0 @0)
- (if (! FLOAT_TYPE_P (TREE_TYPE (@0))
- || ! HONOR_NANS (TYPE_MODE (TREE_TYPE (@0))))
- { constant_boolean_node (true, type); }))
-(for cmp (ge le)
+(for cmp (eq ge le)
(simplify
(cmp @0 @0)
- (eq @0 @0)))
+ (if (! FLOAT_TYPE_P (TREE_TYPE (@0))
+ || ! HONOR_NANS (TYPE_MODE (TREE_TYPE (@0))))
+ { constant_boolean_node (true, type); }
+ (if (cmp != EQ_EXPR)
+ (eq @0 @0)))))
(for cmp (ne gt lt)
(simplify
(cmp @0 @0)