pr45241 give up dot_prod pattern searching if stmt is outside the loop.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give up dot_prod pattern searching if a stmt is outside the loop. * gcc.dg/vect/no-tree-pre-pr45241.c: New. From-SVN: r163207
This commit is contained in:
parent
95718cf89d
commit
3cb35c1250
|
@ -1,3 +1,8 @@
|
||||||
|
2010-08-12 Changpeng Fang <changpeng.fang@amd.com>
|
||||||
|
|
||||||
|
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Give
|
||||||
|
up dot_prod pattern searching if a stmt is outside the loop.
|
||||||
|
|
||||||
2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
|
2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
Uros Bizjak <ubizjak@gmail.com>
|
Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-08-12 Changpeng Fang <changpeng.fang@amd.com>
|
||||||
|
|
||||||
|
PR tree-optimization/45241
|
||||||
|
* gcc.dg/vect/no-tree-pre-pr45241.c: New test.
|
||||||
|
|
||||||
2010-08-12 Uros Bizjak <ubizjak@gmail.com>
|
2010-08-12 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* gcc.target/i386/pr40906-1.c: Add -fno-asynchronous-unwind-tables
|
* gcc.target/i386/pr40906-1.c: Add -fno-asynchronous-unwind-tables
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/* PR tree-optimization/45241 */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-ftree-vectorize" } */
|
||||||
|
|
||||||
|
int
|
||||||
|
foo (short x)
|
||||||
|
{
|
||||||
|
short i, y;
|
||||||
|
int sum;
|
||||||
|
|
||||||
|
for (i = 0; i < x; i++)
|
||||||
|
y = x * i;
|
||||||
|
|
||||||
|
for (i = x; i > 0; i--)
|
||||||
|
sum += y;
|
||||||
|
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* { dg-final { cleanup-tree-dump "vect" } } */
|
|
@ -255,6 +255,11 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree *type_in, tree *type_out)
|
||||||
|
|
||||||
prod_type = half_type;
|
prod_type = half_type;
|
||||||
stmt = SSA_NAME_DEF_STMT (oprnd0);
|
stmt = SSA_NAME_DEF_STMT (oprnd0);
|
||||||
|
|
||||||
|
/* It could not be the dot_prod pattern if the stmt is outside the loop. */
|
||||||
|
if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/* FORNOW. Can continue analyzing the def-use chain when this stmt in a phi
|
/* FORNOW. Can continue analyzing the def-use chain when this stmt in a phi
|
||||||
inside the loop (in case we are analyzing an outer-loop). */
|
inside the loop (in case we are analyzing an outer-loop). */
|
||||||
if (!is_gimple_assign (stmt))
|
if (!is_gimple_assign (stmt))
|
||||||
|
|
Loading…
Reference in New Issue