diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6ee6dc3af91..9ee5a2e50c47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-03-01 Richard Biener + + PR tree-optimization/69994 + * tree-ssa-reassoc.c (ops_equal_values_p): Handle missing case. + 2016-03-01 Ilya Enkovich PR tree-optimization/69956 diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 4c5470739054..4e1251b2a949 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -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; } }