Commit 2c1f37b5 by Ilya Enkovich Committed by Ilya Enkovich

re PR middle-end/66134 ([CHKP] ICE: Unable to coalesce ssa_names 18 and 17 which…

re PR middle-end/66134 ([CHKP] ICE: Unable to coalesce ssa_names 18 and 17 which are marked as MUST COALESCE)

gcc/

	PR middle-end/66134
	* tree-chkp.c (chkp_get_orginal_bounds_for_abnormal_copy): New.
	(chkp_maybe_copy_and_register_bounds): Don't copy abnormal copy.

gcc/testsuite/

	PR middle-end/66134
	* gcc.target/i386/mpx/pr66134.c: New test.

From-SVN: r223215
parent 95f99170
2015-05-15 Ilya Enkovich <enkovich.gnu@gmail.com>
PR middle-end/66134
* tree-chkp.c (chkp_get_orginal_bounds_for_abnormal_copy): New.
(chkp_maybe_copy_and_register_bounds): Don't copy abnormal copy.
2015-05-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2015-05-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.h (AARCH64_TUNE_SLOWMUL): Delete. * config/aarch64/aarch64.h (AARCH64_TUNE_SLOWMUL): Delete.
......
2015-05-15 Ilya Enkovich <enkovich.gnu@gmail.com>
PR middle-end/66134
* gcc.target/i386/mpx/pr66134.c: New test.
2015-05-14 Rohit Arul Raj <rohitrulraj@freescale.com> 2015-05-14 Rohit Arul Raj <rohitrulraj@freescale.com>
* gcc.target/powerpc/pr60158.c: New test. * gcc.target/powerpc/pr60158.c: New test.
......
...@@ -1097,7 +1097,20 @@ chkp_get_bounds_var (tree ptr_var) ...@@ -1097,7 +1097,20 @@ chkp_get_bounds_var (tree ptr_var)
return bnd_var; return bnd_var;
} }
/* If BND is an abnormal bounds copy, return a copied value.
Otherwise return BND. */
static tree
chkp_get_orginal_bounds_for_abnormal_copy (tree bnd)
{
if (bitmap_bit_p (chkp_abnormal_copies, SSA_NAME_VERSION (bnd)))
{
gimple bnd_def = SSA_NAME_DEF_STMT (bnd);
gcc_checking_assert (gimple_code (bnd_def) == GIMPLE_ASSIGN);
bnd = gimple_assign_rhs1 (bnd_def);
}
return bnd;
}
/* Register bounds BND for object PTR in global bounds table. /* Register bounds BND for object PTR in global bounds table.
A copy of bounds may be created for abnormal ssa names. A copy of bounds may be created for abnormal ssa names.
...@@ -1141,11 +1154,7 @@ chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd) ...@@ -1141,11 +1154,7 @@ chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd)
/* For abnormal copies we may just find original /* For abnormal copies we may just find original
bounds and use them. */ bounds and use them. */
if (!abnormal_ptr && !SSA_NAME_IS_DEFAULT_DEF (bnd)) if (!abnormal_ptr && !SSA_NAME_IS_DEFAULT_DEF (bnd))
{ bnd = chkp_get_orginal_bounds_for_abnormal_copy (bnd);
gimple bnd_def = SSA_NAME_DEF_STMT (bnd);
gcc_checking_assert (gimple_code (bnd_def) == GIMPLE_ASSIGN);
bnd = gimple_assign_rhs1 (bnd_def);
}
/* For undefined values we usually use none bounds /* For undefined values we usually use none bounds
value but in case of abnormal edge it may cause value but in case of abnormal edge it may cause
coalescing failures. Use default definition of coalescing failures. Use default definition of
...@@ -1177,6 +1186,7 @@ chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd) ...@@ -1177,6 +1186,7 @@ chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd)
copy = make_temp_ssa_name (pointer_bounds_type_node, copy = make_temp_ssa_name (pointer_bounds_type_node,
gimple_build_nop (), gimple_build_nop (),
CHKP_BOUND_TMP_NAME); CHKP_BOUND_TMP_NAME);
bnd = chkp_get_orginal_bounds_for_abnormal_copy (bnd);
assign = gimple_build_assign (copy, bnd); assign = gimple_build_assign (copy, bnd);
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
......
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