Commit ed17cb57 by Jackson Woodruff Committed by Jeff Law

re PR tree-optimization/71026 (Missing division optimizations)

2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>

	PR tree-optimization/71026
	* match.pd: Move RDIV patterns from fold-const.c
	* fold-const.c (distribute_real_division): Removed.
	(fold_binary_loc): Remove calls to distribute_real_divison.

	PR tree-optimization/71026
	* gcc/testsuire/gcc.dg/fold-div-1.c: Use -O1.

From-SVN: r252827
parent 7b936140
2017-09-15 Jackson Woodruff <jackson.woodruff@arm.com>
PR tree-optimization/71026
* match.pd: Move RDIV patterns from fold-const.c
* fold-const.c (distribute_real_division): Removed.
(fold_binary_loc): Remove calls to distribute_real_divison.
2017-09-15 Jakub Jelinek <jakub@redhat.com>
* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
......
......@@ -3517,6 +3517,13 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(if (!HONOR_SNANS (type))
@0))
(for op (plus minus)
/* Simplify (A / C) +- (B / C) -> (A +- B) / C. */
(simplify
(op (rdiv @0 @1)
(rdiv @2 @1))
(rdiv (op @0 @2) @1)))
/* Simplify sqrt(x) * sqrt(y) -> sqrt(x*y). */
(for root (SQRT CBRT)
(simplify
......
2017-09-15 Jackson Woodruff <jackson.woodruff@arm.com>
PR tree-optimization/71026
* gcc/testsuire/gcc.dg/fold-div-1.c: Use -O1.
2017-09-15 Jakub Jelinek <jakub@redhat.com>
* lib/g++-dg.exp (g++-dg-runtest): Use 17 instead of 1z.
......
/* { dg-do compile } */
/* { dg-options "-funsafe-math-optimizations -fdump-tree-gimple" } */
/* { dg-options "-O1 -funsafe-math-optimizations -fdump-tree-gimple" } */
float f(float x)
{
......
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