aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2018-01-03 07:15:47 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-01-03 07:15:47 +0000
commite54dd6d3a791536543d4769aa09508b89d882f37 (patch)
treedb4448d26a9b2471ac93890a2efe92185d049fe5 /gcc/tree-vect-generic.c
parent9031b367ac87550552318f6516487c70f3ce9a99 (diff)
downloadgcc-e54dd6d3a791536543d4769aa09508b89d882f37.zip
gcc-e54dd6d3a791536543d4769aa09508b89d882f37.tar.gz
gcc-e54dd6d3a791536543d4769aa09508b89d882f37.tar.bz2
poly_int: vectorizable_reduction
This patch makes vectorizable_reduction cope with variable-length vectors. We can handle the simple case of an inner loop reduction for which the target has native support for the epilogue operation. For now we punt on other cases, but patches after the main SVE submission allow SLP and double reductions too. 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * tree.h (build_index_vector): Declare. * tree.c (build_index_vector): New function. * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number of units as polynomial, forcibly converting it to a constant if vectorizable_reduction has already enforced the condition. (vect_create_epilog_for_reduction): Likewise. Use build_index_vector to create a {1,2,3,...} vector. (vectorizable_reduction): Treat the number of units as polynomial. Choose vectype_in based on the largest scalar element size rather than the smallest number of units. Enforce the restrictions relied on above. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r256133
Diffstat (limited to 'gcc/tree-vect-generic.c')
0 files changed, 0 insertions, 0 deletions