vect: Use type precision in reduction epilogue [PR123097].
In the PR we extract non-existent bits/elements from a vector. This is
because we use TYPE_SIZE (vectype) for a boolean vector which returns 8
instead of 4 for RVV's vector (4) <signed-boolean:1>.
The patch uses TYPE_VECTOR_SUBPARTS instead and multiplies its result
with vector_element_bits to get the proper number of elements and size.
PR tree-optimization/123097
gcc/ChangeLog:
* tree-vect-loop.cc (vect_create_epilog_for_reduction):
Calculate vector size by number of elements * bit size per
element.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/pr123097-run.c: New test.
* gcc.target/riscv/rvv/autovec/pr123097.c: New test.