From c7041a4fa37cc4e5b2334701f30a36690e6ddb5d Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Fri, 17 Jun 2016 09:17:39 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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++) { -- 2.30.2