Commit 05575a46 by Sebastian Pop Committed by Sebastian Pop

Fix PR46845: handle scop parameters before scev analysis.

2010-12-14  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/46845
	* sese.c (scalar_evolution_in_region): Handle scop parameters
	before scev analysis.

	* gcc.dg/graphite/id-pr46845.c: New.

From-SVN: r167844
parent 3e6f8b56
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46845
* sese.c (scalar_evolution_in_region): Handle scop parameters
before scev analysis.
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46928
* tree-data-ref.c (analyze_overlapping_iterations): Handle "A[p] == A[p]"
in data dependence analysis with p a parameter of the loop.
......@@ -801,14 +801,16 @@ scalar_evolution_in_region (sese region, loop_p loop, tree t)
struct loop *def_loop;
basic_block before = block_before_sese (region);
/* SCOP parameters. */
if (TREE_CODE (t) == SSA_NAME
&& !defined_in_sese_p (t, region))
return t;
if (TREE_CODE (t) != SSA_NAME
|| loop_in_sese_p (loop, region))
return instantiate_scev (before, loop,
analyze_scalar_evolution (loop, t));
if (!defined_in_sese_p (t, region))
return t;
def = SSA_NAME_DEF_STMT (t);
def_loop = loop_containing_stmt (def);
......
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46845
* gcc.dg/graphite/id-pr46845.c: New.
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46928
* gcc.dg/tree-ssa/ldist-17.c: New.
......
/* { dg-options "-O2 -ffast-math -fgraphite-identity -w -Wno-psabi" { target { i?86-*-* x86_64-*-* } } } */
typedef float V2SF __attribute__ ((vector_size (128)));
V2SF
foo (int x, V2SF a)
{
V2SF b;
if (x & 42)
b = a;
else
b = a + (V2SF) {1.0f/0.0f - 1.0f/0.0f, 1.0f/0.0f - 1.0f/0.0f};
while (x--)
a += b;
return a;
}
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