Commit 0a28fdca by Richard Biener Committed by Richard Biener

re PR c/48885 (missed optimization with restrict qualifier?)

2015-09-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/48885
	* tree-ssa-structalias.c (visit_loadstore): Handle default defs
	as not including any restrict tags from other pointers.

	* gcc.dg/tree-ssa/restrict-6.c: New testcase.

From-SVN: r228073
parent 761d6f4e
2015-09-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/48885
* tree-ssa-structalias.c (visit_loadstore): Handle default defs
as not including any restrict tags from other pointers.
2015-09-23 Thomas Schwinge <thomas@codesourcery.com>
* gcc.c (handle_foffload_option): Don't lose the trailing NUL
2015-09-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/48885
* gcc.dg/tree-ssa/restrict-6.c: New testcase.
2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
* c-c++-common/Wmisleading-indentation.c: Augment test.
......
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1" } */
void
test (int *a, int *b, int * __restrict__ v)
{
*a = *v;
*b = *v;
}
/* { dg-final { scan-tree-dump-times "= \\*v" 1 "fre1" } } */
......@@ -6952,10 +6952,11 @@ visit_loadstore (gimple *, tree base, tree ref, void *clique_)
|| TREE_CODE (base) == TARGET_MEM_REF)
{
tree ptr = TREE_OPERAND (base, 0);
if (TREE_CODE (ptr) == SSA_NAME)
if (TREE_CODE (ptr) == SSA_NAME
&& ! SSA_NAME_IS_DEFAULT_DEF (ptr))
{
/* ??? We need to make sure 'ptr' doesn't include any of
the restrict tags in its points-to set. */
the restrict tags we added bases for in its points-to set. */
return false;
}
......
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