re PR target/69994 (test case gfortran.dg/reassoc_6.f fails starting with r233669)

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

	PR tree-optimization/69994
	* tree-ssa-reassoc.c (ops_equal_values_p): Handle missing case.

From-SVN: r233851
This commit is contained in:
Richard Biener 2016-03-01 12:50:41 +00:00 committed by Richard Biener
parent 3ae0661a71
commit 366298bdda
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-03-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/69994
* tree-ssa-reassoc.c (ops_equal_values_p): Handle missing case.
2016-03-01 Ilya Enkovich <enkovich.gnu@gmail.com>
PR tree-optimization/69956

View File

@ -649,6 +649,7 @@ ops_equal_values_p (tree op1, tree op2)
if (op1 == op2)
return true;
tree orig_op1 = op1;
if (TREE_CODE (op1) == SSA_NAME)
{
gimple *stmt = SSA_NAME_DEF_STMT (op1);
@ -666,7 +667,8 @@ ops_equal_values_p (tree op1, tree op2)
if (gimple_nop_conversion_p (stmt))
{
op2 = gimple_assign_rhs1 (stmt);
if (op1 == op2)
if (op1 == op2
|| orig_op1 == op2)
return true;
}
}