[Bug ada/68590] [6 Regression] FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check"
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 30 15:57:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68590
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following avoids the issue in this PR
Index: gcc/match.pd
===================================================================
--- gcc/match.pd (revision 231065)
+++ gcc/match.pd (working copy)
@@ -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)
More information about the Gcc-bugs
mailing list