tree-vect-loop.c (vect_analyze_loop_operations): Also call vectorizable_reduction...
authorRichard Biener <rguenther@suse.de>
Thu, 26 Sep 2019 13:52:45 +0000 (13:52 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 26 Sep 2019 13:52:45 +0000 (13:52 +0000)
commit9593e8e5e391e77bb065d4689b7511bed6a640a3
tree73df2b834a28480303022eeaf3979ef2da64e536
parent5fdd1d33524c94783eadbf9dcd2c900d65baee72
tree-vect-loop.c (vect_analyze_loop_operations): Also call vectorizable_reduction for vect_double_reduction_def.

2019-09-26  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (vect_analyze_loop_operations): Also call
vectorizable_reduction for vect_double_reduction_def.
(vect_transform_loop): Likewise.
(vect_create_epilog_for_reduction): Move double-reduction
PHI creation and preheader argument setting of PHIs ...
(vectorizable_reduction): ... here.  Also process
vect_double_reduction_def PHIs, creating the vectorized
PHI nodes, remembering the scalar adjustment computed for
the epilogue in STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT.
Remember the original reduction code in STMT_VINFO_REDUC_CODE.
* tree-vectorizer.c (vec_info::new_stmt_vec_info):
Initialize STMT_VINFO_REDUC_CODE.
* tree-vectorizer.h (_stmt_vec_info::reduc_epilogue_adjustment): New.
(_stmt_vec_info::reduc_code): Likewise.
(STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT): Likewise.
(STMT_VINFO_REDUC_CODE): Likewise.

From-SVN: r276150
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h