gimple-fold.c (fold_stmt_1): Check may_propagate_copy before valueizing return stmts.
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
This commit is contained in:
parent
59ec925b11
commit
1af928db7c
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -4414,7 +4414,8 @@ fold_stmt_1 (gimple_stmt_iterator *gsi, bool inplace, tree (*valueize) (tree))
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue