Commit ff86345f by Richard Biener Committed by Richard Biener

re PR tree-optimization/69556 (forwprop4/match.pd undoing work from recip)

2016-02-01  Richard Biener  <rguenther@suse.de>

	PR middle-end/69556
	* match.pd: Guard (C1/X)*C2 -> (C1*C2)/X with single_use.

	* gcc.dg/tree-ssa/recip-8.c: New testcase.

From-SVN: r233040
parent bc369dbd
2016-02-01 Richard Biener <rguenther@suse.de>
PR middle-end/69556
* match.pd: Guard (C1/X)*C2 -> (C1*C2)/X with single_use.
2016-02-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/69574
* tree-chrec.c (hide_evolution_in_other_loops_than_loop): Instead
of asserting return chrec_dont_know.
......
......@@ -445,8 +445,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
/* Fold (C1/X)*C2 into (C1*C2)/X. */
(simplify
(mult (rdiv:s REAL_CST@0 @1) REAL_CST@2)
(if (flag_associative_math)
(mult (rdiv@3 REAL_CST@0 @1) REAL_CST@2)
(if (flag_associative_math
&& single_use (@3))
(with
{ tree tem = const_binop (MULT_EXPR, type, @0, @2); }
(if (tem)
......
2016-02-01 Richard Biener <rguenther@suse.de>
PR middle-end/69556
* gcc.dg/tree-ssa/recip-8.c: New testcase.
2016-02-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/69574
* gcc.dg/torture/pr69574.c: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -fdump-tree-optimized" } */
double bar (double, double, double, double, double);
double
foo (double a)
{
return bar (1.0/a, 2.0/a, 4.0/a, 8.0/a, 16.0/a);
}
/* { dg-final { scan-tree-dump-times "/" 1 "optimized" } } */
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