2016-11-25 Richard Biener <rguenther@suse.de>
* gimple-fold.c (fold_stmt_1): Check may_propagate_copy
before valueizing return stmts.
From-SVN: r242873
+2016-11-25 Richard Biener <rguenther@suse.de>
+
+ * gimple-fold.c (fold_stmt_1): Check may_propagate_copy
+ before valueizing return stmts.
+
2016-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/78343
if (ret && TREE_CODE (ret) == SSA_NAME && valueize)
{
tree val = valueize (ret);
- if (val && val != ret)
+ if (val && val != ret
+ && may_propagate_copy (ret, val))
{
gimple_return_set_retval (ret_stmt, val);
changed = true;