Commit 5bf6606a by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/56559 (ICE in propagate_op_to_single_use, at tree-ssa-reassoc.c:1057)

	PR tree-optimization/56559
	* tree-ssa-reassoc.c (zero_one_operation): When looking at rhs2,
	check that it has only a single use.

	* gcc.dg/tree-ssa/reassoc-26.c: New test.

From-SVN: r196520
parent 7bb75486
2013-03-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56559
* tree-ssa-reassoc.c (zero_one_operation): When looking at rhs2,
check that it has only a single use.
2013-03-07 Richard Biener <rguenther@suse.de>
* doc/invoke.texi (fwhole-program): Discourage use in combination
......
2013-03-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56559
* gcc.dg/tree-ssa/reassoc-26.c: New test.
2013-03-07 Andreas Schwab <schwab@suse.de>
* gcc.dg/pr31490.c: Fix last change.
......
/* PR tree-optimization/56559 */
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math" } */
double a, b, c, d, e;
void
foo ()
{
a = e * e;
b = d * e + c * e * a;
}
......@@ -1107,7 +1107,8 @@ zero_one_operation (tree *def, enum tree_code opcode, tree op)
the operand might be hiding in the rightmost one. */
if (opcode == MULT_EXPR
&& gimple_assign_rhs_code (stmt) == opcode
&& TREE_CODE (gimple_assign_rhs2 (stmt)) == SSA_NAME)
&& TREE_CODE (gimple_assign_rhs2 (stmt)) == SSA_NAME
&& has_single_use (gimple_assign_rhs2 (stmt)))
{
gimple stmt2 = SSA_NAME_DEF_STMT (gimple_assign_rhs2 (stmt));
if (stmt_is_power_of_op (stmt2, op))
......
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