From ba02d3bcce6245132ed45160de2bd12ec3a4204b Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 12 Sep 2011 06:01:15 +0000 Subject: [PATCH] re PR middle-end/50343 (FAIL: gfortran.dg/graphite/id-22.f) 2011-09-12 Richard Guenther PR tree-optimization/50343 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Check that the reduction is over an SSA name before checking its definition. From-SVN: r178775 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vect-patterns.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ae39c27ae1..ad8f931b825 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-09-12 Richard Guenther + + PR tree-optimization/50343 + * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Check + that the reduction is over an SSA name before checking its + definition. + 2011-09-11 Richard Sandiford * config/cris/cris.md: Use match_test rather than eq/ne symbol_ref diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 0d788827513..7fc107cafa9 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -256,6 +256,8 @@ vect_recog_dot_prod_pattern (VEC (gimple, heap) **stmts, tree *type_in, we know that oprnd1 is the reduction variable (defined by a loop-header phi), and oprnd0 is an ssa-name defined by a stmt in the loop body. Left to check that oprnd0 is defined by a (widen_)mult_expr */ + if (TREE_CODE (oprnd0) != SSA_NAME) + return NULL; prod_type = half_type; stmt = SSA_NAME_DEF_STMT (oprnd0);