From: Bin Cheng Date: Fri, 17 Jun 2016 09:17:39 +0000 (+0000) Subject: tree-vect-loop.c (vect_create_epilog_for_reduction): Only insert gimple seq if it... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7041a4fa37cc4e5b2334701f30a36690e6ddb5d;p=gcc.git tree-vect-loop.c (vect_create_epilog_for_reduction): Only insert gimple seq if it's not empty. * tree-vect-loop.c (vect_create_epilog_for_reduction): Only insert gimple seq if it's not empty. From-SVN: r237550 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d0699e2c397..aa2f101dcf1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-06-17 Bin Cheng + + * tree-vect-loop.c (vect_create_epilog_for_reduction): Only + insert gimple seq if it's not empty. + 2016-06-17 Bin Cheng * tree-vectorizer.h (struct dr_with_seg_len): Remove class diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index a2413bf9c67..6c0337bbbcb 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -4353,7 +4353,9 @@ vect_create_epilog_for_reduction (vec vect_defs, gimple *stmt, gimple_seq stmts; vec_init_def = force_gimple_operand (vec_initial_defs[i], &stmts, true, NULL_TREE); - gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); + if (stmts) + gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); + def = vect_defs[i]; for (j = 0; j < ncopies; j++) {