summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-24 07:38:19 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-24 07:38:19 +0000
commitb7459437aef76ee975ddd0e969077c7c1c77aa13 (patch)
tree3d61b51956e0e99640086b8707875344e2e74bbc /gcc/tree-vect-slp.c
parentaca21847a28e296d86dae8f53863487378926c6d (diff)
downloadgcc-b7459437aef76ee975ddd0e969077c7c1c77aa13.tar.gz
2011-09-24 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 179138 using svnmerge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@179139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 669b2bb203c..9171ba991b1 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1905,14 +1905,9 @@ vect_get_constant_vectors (tree op, slp_tree slp_node,
gimple def_stmt;
struct loop *loop;
- if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def)
+ if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def
+ && reduc_index != -1)
{
- if (reduc_index == -1)
- {
- VEC_free (tree, heap, *vec_oprnds);
- return;
- }
-
op_num = reduc_index - 1;
op = gimple_op (stmt, reduc_index);
/* For additional copies (see the explanation of NUMBER_OF_COPIES below)
@@ -2164,7 +2159,7 @@ vect_get_slp_defs (tree op0, tree op1, slp_tree slp_node,
return;
code = gimple_assign_rhs_code (first_stmt);
- if (get_gimple_rhs_class (code) != GIMPLE_BINARY_RHS || !vec_oprnds1)
+ if (get_gimple_rhs_class (code) != GIMPLE_BINARY_RHS || !vec_oprnds1 || !op1)
return;
/* The number of vector defs is determined by the number of vector statements