34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
Temporarily revert:
|
|
2013-12-05 Richard Biener <rguenther@suse.de>
|
|
|
|
Backport from mainline
|
|
2013-11-19 Richard Biener <rguenther@suse.de>
|
|
|
|
PR middle-end/58956
|
|
* tree-ssa-ter.c (find_replaceable_in_bb): Avoid forwarding
|
|
loads into stmts that may clobber it.
|
|
|
|
--- gcc/tree-ssa-ter.c (revision 205709)
|
|
+++ gcc/tree-ssa-ter.c (revision 205708)
|
|
@@ -643,7 +643,8 @@ find_replaceable_in_bb (temp_expr_table_
|
|
/* If the stmt does a memory store and the replacement
|
|
is a load aliasing it avoid creating overlapping
|
|
assignments which we cannot expand correctly. */
|
|
- if (gimple_vdef (stmt))
|
|
+ if (gimple_vdef (stmt)
|
|
+ && gimple_assign_single_p (stmt))
|
|
{
|
|
gimple def_stmt = SSA_NAME_DEF_STMT (use);
|
|
while (is_gimple_assign (def_stmt)
|
|
@@ -652,8 +653,8 @@ find_replaceable_in_bb (temp_expr_table_
|
|
= SSA_NAME_DEF_STMT (gimple_assign_rhs1 (def_stmt));
|
|
if (gimple_vuse (def_stmt)
|
|
&& gimple_assign_single_p (def_stmt)
|
|
- && stmt_may_clobber_ref_p (stmt,
|
|
- gimple_assign_rhs1 (def_stmt)))
|
|
+ && refs_may_alias_p (gimple_assign_lhs (stmt),
|
|
+ gimple_assign_rhs1 (def_stmt)))
|
|
same_root_var = true;
|
|
}
|
|
|