tree-vect-loop.c (vect_create_epilog_for_reduction): Only insert gimple seq if it...
authorBin Cheng <bin.cheng@arm.com>
Fri, 17 Jun 2016 09:17:39 +0000 (09:17 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Fri, 17 Jun 2016 09:17:39 +0000 (09:17 +0000)
* tree-vect-loop.c (vect_create_epilog_for_reduction): Only
insert gimple seq if it's not empty.

From-SVN: r237550

gcc/ChangeLog
gcc/tree-vect-loop.c

index d0699e2c3979ac68bc61569d1d580a18d63d8393..aa2f101dcf11af025b83a6b0fd60902118520b0d 100644 (file)
@@ -1,3 +1,8 @@
+2016-06-17 Bin Cheng  <bin.cheng@arm.com>
+
+       * tree-vect-loop.c (vect_create_epilog_for_reduction): Only
+       insert gimple seq if it's not empty.
+
 2016-06-17  Bin Cheng  <bin.cheng@arm.com>
 
        * tree-vectorizer.h (struct dr_with_seg_len): Remove class
index a2413bf9c678d11cc2ffd22bc7d984e911831804..6c0337bbbcbebd6443fd3bcef45c1b23a7833486 100644 (file)
@@ -4353,7 +4353,9 @@ vect_create_epilog_for_reduction (vec<tree> 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++)
         {