aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-09-15 16:43:24 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-09-16 00:48:44 -0700
commit48a0f6937d7c1faadf16f5ff7bd227a8392ddfe8 (patch)
treeecafa5fd1ff1c3e1b36ce8cf086ff8d884f93fe9 /gcc
parent8d402c307f289a4cc96fec36189864d7e3f37893 (diff)
downloadgcc-48a0f6937d7c1faadf16f5ff7bd227a8392ddfe8.zip
gcc-48a0f6937d7c1faadf16f5ff7bd227a8392ddfe8.tar.gz
gcc-48a0f6937d7c1faadf16f5ff7bd227a8392ddfe8.tar.bz2
vect: Set pattern_stmt_p on the newly created stmt_vec_info
While adding simple_dce_worklist to the vectorizer, there was a regression due to the slp patterns would create a SSA name but never free it even if it never existed in the IR (this case as addsub but complex ones had the same issue). The reason why it was never freed was the stmt_vec_info was not marked as a pattern stmt, unlike the other pattern stmts that use vect_init_pattern_stmt instead of vec_info::add_pattern_stmt (which is used for SLP patterns). Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-vectorizer.cc (vec_info::add_pattern_stmt): Set pattern_stmt_p. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-vectorizer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
index 0efabcb..4279b6d 100644
--- a/gcc/tree-vectorizer.cc
+++ b/gcc/tree-vectorizer.cc
@@ -535,6 +535,7 @@ stmt_vec_info
vec_info::add_pattern_stmt (gimple *stmt, stmt_vec_info stmt_info)
{
stmt_vec_info res = new_stmt_vec_info (stmt);
+ res->pattern_stmt_p = true;
set_vinfo_for_stmt (stmt, res, false);
STMT_VINFO_RELATED_STMT (res) = stmt_info;
return res;