From: Richard Biener Date: Mon, 11 Aug 2025 09:20:41 +0000 (+0200) Subject: Do not use STMT_VINFO_VECTYPE in vectorizable_reduction X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bceae48c3c0978fc840169dd4b487c24a0ac5c53;p=thirdparty%2Fgcc.git Do not use STMT_VINFO_VECTYPE in vectorizable_reduction There's one use of STMT_VINFO_VECTYPE in vectorizable_reduction where I'm only 99% sure which SLP_TREE_VECTYPE to replace it with (vectorizable_reduction needs a lot of post-only-SLP TLC). The following replaces it with the hopefully appropriate one. * tree-vect-loop.cc (vectorizable_reduction): Replace STMT_VINFO_VECTYPE use with SLP_TREE_VECTYPE. --- diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 5fc24dc8fcd..64e5c23c2e2 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -7225,7 +7225,7 @@ vectorizable_reduction (loop_vec_info loop_vinfo, vectype_in = vectype_op; } else if (!vectype_in) - vectype_in = STMT_VINFO_VECTYPE (phi_info); + vectype_in = SLP_TREE_VECTYPE (slp_node); if (!REDUC_GROUP_FIRST_ELEMENT (vdef)) vdef_slp = SLP_TREE_CHILDREN (vdef_slp)[reduc_idx]; }