diff options
author | Richard Biener <rguenther@suse.de> | 2023-10-17 13:42:59 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-10-17 14:24:51 +0200 |
commit | 323209cd73bf1d81d91637677db5883afc8ae5f6 (patch) | |
tree | 2e288c4840292fdd7e906c1cd6ccc7a2a2f24297 /gcc/tree-vect-slp.cc | |
parent | fbdf88a1f6de2399101ecea948ff1abbf82459fc (diff) | |
download | gcc-323209cd73bf1d81d91637677db5883afc8ae5f6.zip gcc-323209cd73bf1d81d91637677db5883afc8ae5f6.tar.gz gcc-323209cd73bf1d81d91637677db5883afc8ae5f6.tar.bz2 |
tree-optimization/111846 - put simd-clone-info into SLP tree
The following avoids bogously re-using the simd-clone-info we
currently hang off stmt_info from two different SLP contexts where
a different number of lanes should have chosen a different best
simdclone.
PR tree-optimization/111846
* tree-vectorizer.h (_slp_tree::simd_clone_info): Add.
(SLP_TREE_SIMD_CLONE_INFO): New.
* tree-vect-slp.cc (_slp_tree::_slp_tree): Initialize
SLP_TREE_SIMD_CLONE_INFO.
(_slp_tree::~_slp_tree): Release it.
* tree-vect-stmts.cc (vectorizable_simd_clone_call): Use
SLP_TREE_SIMD_CLONE_INFO or STMT_VINFO_SIMD_CLONE_INFO
dependent on if we're doing SLP.
* gcc.dg/vect/pr111846.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-slp.cc')
-rw-r--r-- | gcc/tree-vect-slp.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index af8f503..d081999 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -117,6 +117,7 @@ _slp_tree::_slp_tree () SLP_TREE_CHILDREN (this) = vNULL; SLP_TREE_LOAD_PERMUTATION (this) = vNULL; SLP_TREE_LANE_PERMUTATION (this) = vNULL; + SLP_TREE_SIMD_CLONE_INFO (this) = vNULL; SLP_TREE_DEF_TYPE (this) = vect_uninitialized_def; SLP_TREE_CODE (this) = ERROR_MARK; SLP_TREE_VECTYPE (this) = NULL_TREE; @@ -143,6 +144,7 @@ _slp_tree::~_slp_tree () SLP_TREE_VEC_DEFS (this).release (); SLP_TREE_LOAD_PERMUTATION (this).release (); SLP_TREE_LANE_PERMUTATION (this).release (); + SLP_TREE_SIMD_CLONE_INFO (this).release (); if (this->failed) free (failed); } |