Commit ed20a004 by Richard Biener Committed by Richard Biener

re PR rtl-optimization/72488 (wrong code (SIGFPE) at -Os and above on…

re PR rtl-optimization/72488 (wrong code (SIGFPE) at -Os and above on x86_64-linux-gnu (in the 64-bit mode))

2017-01-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/72488
	* tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
	sure to restore SSA info.
	* tree-ssa.c (verify_ssa): Verify SSA info is not shared.

From-SVN: r244623
parent 4f94fa11
2017-01-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/72488
* tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
sure to restore SSA info.
* tree-ssa.c (verify_ssa): Verify SSA info is not shared.
2017-01-19 Richard Earnshaw <rearnsha@arm.com> 2017-01-19 Richard Earnshaw <rearnsha@arm.com>
PR rtl-optimization/79121 PR rtl-optimization/79121
......
...@@ -4844,6 +4844,7 @@ run_scc_vn (vn_lookup_kind default_vn_walk_kind_) ...@@ -4844,6 +4844,7 @@ run_scc_vn (vn_lookup_kind default_vn_walk_kind_)
walker.walk (ENTRY_BLOCK_PTR_FOR_FN (cfun)); walker.walk (ENTRY_BLOCK_PTR_FOR_FN (cfun));
if (walker.fail) if (walker.fail)
{ {
scc_vn_restore_ssa_info ();
free_scc_vn (); free_scc_vn ();
return false; return false;
} }
......
...@@ -1027,9 +1027,11 @@ verify_ssa (bool check_modified_stmt, bool check_ssa_operands) ...@@ -1027,9 +1027,11 @@ verify_ssa (bool check_modified_stmt, bool check_ssa_operands)
timevar_push (TV_TREE_SSA_VERIFY); timevar_push (TV_TREE_SSA_VERIFY);
{
/* Keep track of SSA names present in the IL. */ /* Keep track of SSA names present in the IL. */
size_t i; size_t i;
tree name; tree name;
hash_map <void *, tree> ssa_info;
FOR_EACH_SSA_NAME (i, name, cfun) FOR_EACH_SSA_NAME (i, name, cfun)
{ {
...@@ -1046,6 +1048,29 @@ verify_ssa (bool check_modified_stmt, bool check_ssa_operands) ...@@ -1046,6 +1048,29 @@ verify_ssa (bool check_modified_stmt, bool check_ssa_operands)
name, stmt, virtual_operand_p (name))) name, stmt, virtual_operand_p (name)))
goto err; goto err;
} }
void *info = NULL;
if (POINTER_TYPE_P (TREE_TYPE (name)))
info = SSA_NAME_PTR_INFO (name);
else if (INTEGRAL_TYPE_P (TREE_TYPE (name)))
info = SSA_NAME_RANGE_INFO (name);
if (info)
{
bool existed;
tree &val = ssa_info.get_or_insert (info, &existed);
if (existed)
{
error ("shared SSA name info");
print_generic_expr (stderr, val, 0);
fprintf (stderr, " and ");
print_generic_expr (stderr, name, 0);
fprintf (stderr, "\n");
goto err;
}
else
val = name;
}
}
} }
calculate_dominance_info (CDI_DOMINATORS); calculate_dominance_info (CDI_DOMINATORS);
......
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