Use correct vector type in neutral_op_for_slp_reduction
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 8 Nov 2019 16:08:03 +0000 (16:08 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 8 Nov 2019 16:08:03 +0000 (16:08 +0000)
commitd308ca27c71e43625b378dc6c2774105867d4fa7
treef10d05368dc74046b05aa79baa3a0ae7fda28b41
parentfd14d6cbc4c82fd22a77d7c38ec37b5c8a97f23c
Use correct vector type in neutral_op_for_slp_reduction

With the new reduction vectype handling, neutral_op_for_slp_reduction
needs to know whether the caller is using STMT_VINFO_REDUC_VECTYPE
(for an epilogue value) or STMT_VINFO_VECTYPE (for a PHI argument).

This fixes various gcc.target/aarch64/sve/slp_* tests.

2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-loop.c (neutral_op_for_slp_reduction): Take the
vector type as an argument rather than reading it from the
stmt_vec_info.
(vect_create_epilog_for_reduction): Update accordingly.
(vectorizable_reduction): Likewise.
(vect_transform_cycle_phi): Likewise.

From-SVN: r277977
gcc/ChangeLog
gcc/tree-vect-loop.c