Commit 9707eeb0 by Sebastian Pop Committed by Sebastian Pop

Fix miscompile of 416.gamess.

2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
	the case removed in the previous patch, when the only phi argument
	is defined in the same loop as the phi node itself.  Handle it
	separately from the invariant case by both propagating it outside
	the region and replacing the phi node with an assign.

From-SVN: r163169
parent 974335d6
2010-08-02 Sebastian Pop <sebastian.pop@amd.com> 2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
the case removed in the previous patch, when the only phi argument
is defined in the same loop as the phi node itself. Handle it
separately from the invariant case by both propagating it outside
the region and replacing the phi node with an assign.
2010-08-02 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
constant phi nodes with one argument are is_gimple_min_invariant constant phi nodes with one argument are is_gimple_min_invariant
and SSA_NAME_IS_DEFAULT_DEF. and SSA_NAME_IS_DEFAULT_DEF.
......
2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
the case removed in the previous patch, when the only phi argument
is defined in the same loop as the phi node itself. Handle it
separately from the invariant case by both propagating it outside
the region and replacing the phi node with an assign.
2010-07-28 Sebastian Pop <sebastian.pop@amd.com> 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
......
...@@ -2249,6 +2249,16 @@ rewrite_close_phi_out_of_ssa (gimple_stmt_iterator *psi, sese region) ...@@ -2249,6 +2249,16 @@ rewrite_close_phi_out_of_ssa (gimple_stmt_iterator *psi, sese region)
return; return;
} }
else if (gimple_bb (SSA_NAME_DEF_STMT (arg))->loop_father == bb->loop_father)
{
propagate_expr_outside_region (res, arg, region);
stmt = gimple_build_assign (res, arg);
remove_phi_node (psi, false);
gsi_insert_before (&gsi, stmt, GSI_NEW_STMT);
SSA_NAME_DEF_STMT (res) = stmt;
return;
}
/* If res is scev analyzable and is not a scalar value, it is safe /* If res is scev analyzable and is not a scalar value, it is safe
to ignore the close phi node: it will be code generated in the to ignore the close phi node: it will be code generated in the
out of Graphite pass. */ out of Graphite pass. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment