With previous changes I overlooked one use of vectype.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
PR tree-optimization/123539
* tree-vect-loop.cc (vect_create_epilog_for_reduction):
Use the compute vectype to pun down to smaller or element
size for by-element reductions.
---
gcc/tree-vect-loop.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 03339641750..74eecb832e6 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -6000,7 +6000,7 @@ vect_create_epilog_for_reduction (loop_vec_info
loop_vinfo,
&& (mode1 = targetm.vectorize.split_reduction (mode)) != mode)
nunits1 = GET_MODE_NUNITS (mode1).to_constant ();
- tree vectype1 = vectype;
+ tree vectype1 = compute_vectype;
if (mode1 != mode)
{
vectype1 = get_related_vectype_for_scalar_type (TYPE_MODE (vectype),
--
2.51.0