aboutsummaryrefslogtreecommitdiff
path: root/gcc/generic-match-head.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-05 09:36:09 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-05 09:36:09 +0200
commit0043b5280e6f571819d8764d76594a7a20467d00 (patch)
tree67f05915a1d5bd9c404586fb97a5e8fbc421c015 /gcc/generic-match-head.c
parent30648d02155fd2cf5e15c9741f08ed08554fa3d6 (diff)
downloadgcc-0043b5280e6f571819d8764d76594a7a20467d00.zip
gcc-0043b5280e6f571819d8764d76594a7a20467d00.tar.gz
gcc-0043b5280e6f571819d8764d76594a7a20467d00.tar.bz2
re PR tree-optimization/91734 (gcc skip an if statement with "-O1 -ffast-math")
PR tree-optimization/91734 * generic-match-head.c: Include fold-const-call.h. * match.pd (sqrt(x) cmp c): Check the boundary value and in case inexact computation of c*c affects comparison of the boundary, turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR or GT_EXPR into GE_EXPR. Punt for sqrt comparisons against NaN and for -frounding-math. For c2, try the next smaller or larger floating point constant depending on comparison code and if it has the same sqrt as c2, use it instead of c2. * gcc.dg/pr91734.c: New test. From-SVN: r276621
Diffstat (limited to 'gcc/generic-match-head.c')
-rw-r--r--gcc/generic-match-head.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/generic-match-head.c b/gcc/generic-match-head.c
index b54e035..fdc6039 100644
--- a/gcc/generic-match-head.c
+++ b/gcc/generic-match-head.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
#include "vec-perm-indices.h"
#include "fold-const.h"
+#include "fold-const-call.h"
#include "stor-layout.h"
#include "tree-dfa.h"
#include "builtins.h"