diff options
author | Richard Biener <rguenther@suse.de> | 2025-07-10 11:23:59 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-07-10 13:11:30 +0200 |
commit | 2b99395c312883ccf114476347a7f5174fde436d (patch) | |
tree | bf8ddc2203134b1b764ff7035c9b8b10877a60d2 | |
parent | 31c96621cc307fed1a0a01c0c2f18afaaf50b256 (diff) | |
download | gcc-2b99395c312883ccf114476347a7f5174fde436d.zip gcc-2b99395c312883ccf114476347a7f5174fde436d.tar.gz gcc-2b99395c312883ccf114476347a7f5174fde436d.tar.bz2 |
Adjust reduction with conversion SLP build
The following adjusts how we set SLP_TREE_VECTYPE for the conversion
node we build when fixing up the reduction with conversion SLP instance.
This should probably see more TLC, but the following avoids relying
on STMT_VINFO_VECTYPE for this.
* tree-vect-slp.cc (vect_build_slp_instance): Do not use
SLP_TREE_VECTYPE to determine the conversion back to the
reduction IV.
-rw-r--r-- | gcc/tree-vect-slp.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 68ef1dd..5ef45fd 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -4067,7 +4067,12 @@ vect_build_slp_instance (vec_info *vinfo, for (unsigned i = 0; i < group_size; ++i) scalar_stmts.quick_push (next_info); slp_tree conv = vect_create_new_slp_node (scalar_stmts, 1); - SLP_TREE_VECTYPE (conv) = STMT_VINFO_VECTYPE (next_info); + SLP_TREE_VECTYPE (conv) + = get_vectype_for_scalar_type (vinfo, + TREE_TYPE + (gimple_assign_lhs + (scalar_def)), + group_size); SLP_TREE_CHILDREN (conv).quick_push (node); SLP_INSTANCE_TREE (new_instance) = conv; /* We also have to fake this conversion stmt as SLP reduction |