Commit 3eb1eecf by Jakub Jelinek

re PR tree-optimization/84334 (Stack overflow with -Ofast -frounding-math)

	PR tree-optimization/84334
	* match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
	also a CONSTANT_CLASS_P, punt.

	* gcc.dg/pr84334.c: New test.

From-SVN: r257683
parent 8fa4bd81
2018-02-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84334
* match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
also a CONSTANT_CLASS_P, punt.
2018-02-14 Jim Wilson <jimw@sifive.com> 2018-02-14 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (riscv_first_stack_step): Move locals after * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
...@@ -2336,6 +2342,7 @@ ...@@ -2336,6 +2342,7 @@
* config/aarch64/predicates.md (Uti): Add new constraint. * config/aarch64/predicates.md (Uti): Add new constraint.
2018-01-17 Carl Love <cel@us.ibm.com> 2018-01-17 Carl Love <cel@us.ibm.com>
* config/rs6000/vsx.md (define_expand xl_len_r, * config/rs6000/vsx.md (define_expand xl_len_r,
define_expand stxvl, define_expand *stxvl): Add match_dup argument. define_expand stxvl, define_expand *stxvl): Add match_dup argument.
(define_insn): Add, match_dup 1 argument to define_insn stxvll and (define_insn): Add, match_dup 1 argument to define_insn stxvll and
......
...@@ -1733,9 +1733,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) ...@@ -1733,9 +1733,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
CONSTANT_CLASS_P@2) CONSTANT_CLASS_P@2)
/* If one of the types wraps, use that one. */ /* If one of the types wraps, use that one. */
(if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)) (if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type))
(if (outer_op == PLUS_EXPR) /* If all 3 captures are CONSTANT_CLASS_P, punt, as we might recurse
(plus (view_convert @0) (inner_op @2 (view_convert @1))) forever if something doesn't simplify into a constant. */
(minus (view_convert @0) (neg_inner_op @2 (view_convert @1)))) (if (!CONSTANT_CLASS_P (@0))
(if (outer_op == PLUS_EXPR)
(plus (view_convert @0) (inner_op @2 (view_convert @1)))
(minus (view_convert @0) (neg_inner_op @2 (view_convert @1)))))
(if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)) (if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
|| TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0))) || TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0)))
(if (outer_op == PLUS_EXPR) (if (outer_op == PLUS_EXPR)
......
2018-02-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84334
* gcc.dg/pr84334.c: New test.
2018-02-14 Carl Love <cel@us.ibm.com> 2018-02-14 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-4-int128-runnable.c * gcc.target/powerpc/builtins-4-int128-runnable.c
(dg-require-effective-target): Change vsx_hw to p8vector_hw. (dg-require-effective-target): Change vsx_hw to p8vector_hw.
(dg-options): Change -maltivec -mvsx to -mpower8-vector. (dg-options): Change -maltivec -mvsx to -mpower8-vector.
...@@ -1558,6 +1564,7 @@ ...@@ -1558,6 +1564,7 @@
* gcc.target/powerpc/pr83862.c: New test. * gcc.target/powerpc/pr83862.c: New test.
2018-01-22 Carl Love <cel@us.ibm.com> 2018-01-22 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/powerpc.exp: Add torture tests for * gcc.target/powerpc/powerpc.exp: Add torture tests for
builtins-4-runnable.c, builtins-6-runnable.c, builtins-4-runnable.c, builtins-6-runnable.c,
builtins-5-p9-runnable.c, builtins-6-p9-runnable.c. builtins-5-p9-runnable.c, builtins-6-p9-runnable.c.
...@@ -3617,7 +3624,7 @@ ...@@ -3617,7 +3624,7 @@
PR c++/83734 PR c++/83734
* g++.dg/cpp0x/pr83734.C: New test. * g++.dg/cpp0x/pr83734.C: New test.
2018-01-09 Carl Love <cel@us.ibm.com> 2018-01-09 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-1.c (main): Add tests for vec_mergee and * gcc.target/powerpc/builtins-1.c (main): Add tests for vec_mergee and
vec_mergeo builtins with float, double, long long, unsigned long long, vec_mergeo builtins with float, double, long long, unsigned long long,
......
/* PR tree-optimization/84334 */
/* { dg-do compile } */
/* { dg-options "-Ofast -frounding-math" } */
float
foo (void)
{
float a = 9.999999974752427078783512115478515625e-7f;
float b = 1.999999994950485415756702423095703125e-6f;
float c = 4.999999873689375817775726318359375e-6f;
return a + b + c;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment