diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-12 21:29:39 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-12 21:29:39 +0000 |
commit | e3e3ee4b167110ad72a93b13c381ac41678d4524 (patch) | |
tree | 0f95564f0bc325d0f52fc5b75d1db05e8b55ba23 /gcc/tree-vect-patterns.c | |
parent | d06ed0b17d32fb816ae58009d96518952c006225 (diff) | |
download | gcc-e3e3ee4b167110ad72a93b13c381ac41678d4524.tar.gz |
2008-02-12 Richard Guenther <rguenther@suse.de>
PR tree-optimization/35171
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Deal with
default defs.
* gcc.c-torture/compile/pr35171.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132270 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 24a0e5de5ac..c1ce14c4bbb 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -246,15 +246,14 @@ vect_recog_dot_prod_pattern (tree last_stmt, tree *type_in, tree *type_out) prod_type = half_type; stmt = SSA_NAME_DEF_STMT (oprnd0); - gcc_assert (stmt); + /* 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). */ + if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) + return NULL; stmt_vinfo = vinfo_for_stmt (stmt); gcc_assert (stmt_vinfo); if (STMT_VINFO_DEF_TYPE (stmt_vinfo) != vect_loop_def) return NULL; - /* 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). */ - if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) - return NULL; expr = GIMPLE_STMT_OPERAND (stmt, 1); if (TREE_CODE (expr) != MULT_EXPR) return NULL; |