{"id":2221483,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2221483/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260409133738.F10A74BA2E09@sourceware.org/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260409133738.F10A74BA2E09@sourceware.org>","list_archive_url":null,"date":"2026-04-09T13:37:08","name":"[2/2] SLP pattern TLC","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"b17c2e42efbbb61b643eb98bd17f98645423cd0f","submitter":{"id":4338,"url":"http://patchwork.ozlabs.org/api/1.2/people/4338/?format=json","name":"Richard Biener","email":"rguenther@suse.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260409133738.F10A74BA2E09@sourceware.org/mbox/","series":[{"id":499304,"url":"http://patchwork.ozlabs.org/api/1.2/series/499304/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=499304","date":"2026-04-09T13:36:44","name":"[1/2] SLP pattern TLC","version":1,"mbox":"http://patchwork.ozlabs.org/series/499304/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2221483/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2221483/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=PoCSJl2V;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=8DFGHyJT;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=QFk1LZQa;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=CknB6oMt;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=PoCSJl2V;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=8DFGHyJT;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=QFk1LZQa;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=CknB6oMt","sourceware.org;\n dmarc=pass (p=none dis=none) header.from=suse.de","sourceware.org; spf=pass smtp.mailfrom=suse.de","server2.sourceware.org;\n arc=none smtp.remote-ip=195.135.223.131","smtp-out2.suse.de;\n\tnone"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fs1Fw73rtz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 23:37:40 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id F10A74BA2E09\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 13:37:38 +0000 (GMT)","from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])\n by sourceware.org (Postfix) with ESMTPS id B85E84BA2E3E\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 13:37:10 +0000 (GMT)","from murzim.nue2.suse.org (unknown [10.168.4.243])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out2.suse.de (Postfix) with ESMTPS id 9F9865BD26\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 13:37:08 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org F10A74BA2E09","OpenDKIM Filter v2.11.0 sourceware.org B85E84BA2E3E"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org B85E84BA2E3E","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org B85E84BA2E3E","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775741830; cv=none;\n b=O3fZw3HK6v2qIkuUMv8fY9G+2s2SxHRJyz8eIkqMlda9pw/QRVyGVgdyMwceK1MPSh7h/OmsUiWcrWTFoS6bKRlHIV4uqxUb+ngLTI71w5g9G3z428PdQdxt9jc/lfH/hwg0t3csGaLETyTW28bbi9L/Q7RNM/AeFG98XgcfRc0=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775741830; c=relaxed/simple;\n bh=mIo20TTkJARtZ+P3/Jy9K8IXFarNWeB7VCaWQPqEzBc=;\n h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date:\n From:To:Subject:MIME-Version;\n b=ommoiZqm6kHl0oUTsBcmmfuHOXLFOVvOD8Dag74I/8lsggB1D3KnJN1DT5mWI2wqqxLmHEJLE7Y3vRajqgYwcyDXvMZj3W8fEhq+R+gj94Il2euSfxymD/o1MCDy9mqJFEpWejrlQj9BcoDl+NiEIeT0he0KwscVo3zUiNxnkiM=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1775741829;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=iiJRDj5j4UvHh6Smvj+Q/jwVT44GZkKfzkhHHxxAXpo=;\n b=PoCSJl2VSrWTAAajsPiM+bqwERXkC0bmtCSlK3wKMH5bUKldSxsU5ZseIgo6uwmf9K1lHj\n 04sV/wo8LaRtiscHA1cmQT7KTGP6B4t470PryOPMtJXPDqJy2CF7Rp7T2/m7qEEsKlxm9/\n 1cSO+k6uQLg9cjjNSliYMcgoRf4xk2g=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1775741829;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=iiJRDj5j4UvHh6Smvj+Q/jwVT44GZkKfzkhHHxxAXpo=;\n b=8DFGHyJT4yWN88zjpsRCp4JpkCa8jYIe9d4GFLMoLjWi/SYhKT/FwxfRNxiN6t2x+ZydyT\n 3bF2jfASEy/bgQAQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1775741828;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=iiJRDj5j4UvHh6Smvj+Q/jwVT44GZkKfzkhHHxxAXpo=;\n b=QFk1LZQa7IuuUp2e8d8a04d5v1NX8onTjC5eZYRZ+dOU0z+XKsb+fIQtlwl1putAZg+JEg\n K5uWRdQ8ABR5+Zr1JGbBkI1AFWJfanvNCtde4Mbt9661QyKXARoPAw+11ine6eo30DPgZf\n 9EIE99MX1r+RNBVAZ9CWJO8B2dbM0uI=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1775741828;\n h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version:\n content-type:content-type; bh=iiJRDj5j4UvHh6Smvj+Q/jwVT44GZkKfzkhHHxxAXpo=;\n b=CknB6oMtjjmdPVJ+pcHMP0a4NfX0shmQ5U3zwNyoA2lBnRi4U93naWMF7V47GlnAuMy1l8\n YAND3i3GJ3KmdGBQ=="],"Date":"Thu, 9 Apr 2026 15:37:08 +0200 (CEST)","From":"Richard Biener <rguenther@suse.de>","To":"gcc-patches@gcc.gnu.org","Subject":"[PATCH 2/2] SLP pattern TLC","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Spamd-Result":"default: False [-1.80 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n MISSING_MID(2.50)[]; NEURAL_HAM_LONG(-1.00)[-0.999];\n NEURAL_HAM_SHORT(-0.20)[-0.991]; MIME_GOOD(-0.10)[text/plain];\n TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1];\n MISSING_XM_UA(0.00)[]; FROM_EQ_ENVFROM(0.00)[];\n TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org","Message-Id":"<20260409133738.F10A74BA2E09@sourceware.org>"},"content":"The following removes STMT_VINFO_SLP_VECT_ONLY_PATTERN which only\nexists so we can do some cleanup that doesn't seem to be necessary.\nWe've been cleaning the original to pattern stmt link, but\nadd_pattern_stmt never sets that up - it only sets up the pattern\nto original stmt link, so the SLP pattern is only reachable from\nthe pattern SLP nodes representative.\n\nBootstrap and regtest ongoing on x86_64-unknown-linux-gnu, ontop\nof [1/2].\n\nQueued for stage1.\n\n\t* tree-vectorizer.h (_stmt_vec_info::slp_vect_pattern_only_p):\n\tRemove.\n\t(STMT_VINFO_SLP_VECT_ONLY_PATTERN): Likewise.\n\t* tree-vectorizer.cc (vec_info::new_stmt_vec_info): Do not\n\tinitialize STMT_VINFO_SLP_VECT_ONLY_PATTERN.\n\t* tree-vect-loop.cc (vect_analyze_loop_2): Nothing to do\n\tfor SLP pattern stmts that are not reachable from scalar\n\tstmts anyway.  Remove dead code.\n\t* tree-vect-slp-patterns.cc (complex_pattern::build): Do not\n\tset STMT_VINFO_SLP_VECT_ONLY_PATTERN.\n\t(addsub_pattern::build): Likewise.\n\t* tree-vect-slp.cc (vect_free_slp_tree): Remove dead code.\n---\n gcc/tree-vect-loop.cc         | 14 --------------\n gcc/tree-vect-slp-patterns.cc |  3 ---\n gcc/tree-vect-slp.cc          | 10 ----------\n gcc/tree-vectorizer.cc        |  1 -\n gcc/tree-vectorizer.h         |  5 -----\n 5 files changed, 33 deletions(-)","diff":"diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc\nindex f90f43fef27..60f024db845 100644\n--- a/gcc/tree-vect-loop.cc\n+++ b/gcc/tree-vect-loop.cc\n@@ -2702,20 +2702,6 @@ again:\n \t\t= STMT_VINFO_DEF_TYPE (stmt_info);\n \t    }\n \t}\n-      for (gimple_stmt_iterator si = gsi_start_bb (bb);\n-\t   !gsi_end_p (si); gsi_next (&si))\n-\t{\n-\t  if (is_gimple_debug (gsi_stmt (si)))\n-\t    continue;\n-\t  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));\n-\t  if (STMT_VINFO_IN_PATTERN_P (stmt_info))\n-\t    {\n-\t      stmt_vec_info pattern_stmt_info\n-\t\t= STMT_VINFO_RELATED_STMT (stmt_info);\n-\t      if (STMT_VINFO_SLP_VECT_ONLY_PATTERN (pattern_stmt_info))\n-\t\tSTMT_VINFO_IN_PATTERN_P (stmt_info) = false;\n-\t    }\n-\t}\n     }\n   /* Free optimized alias test DDRS.  */\n   LOOP_VINFO_LOWER_BOUNDS (loop_vinfo).truncate (0);\ndiff --git a/gcc/tree-vect-slp-patterns.cc b/gcc/tree-vect-slp-patterns.cc\nindex ab4a42d1964..131ab90e2e5 100644\n--- a/gcc/tree-vect-slp-patterns.cc\n+++ b/gcc/tree-vect-slp-patterns.cc\n@@ -579,7 +579,6 @@ complex_pattern::build (vec_info *vinfo)\n \n       gimple_set_bb (call_stmt, gimple_bb (stmt_info->stmt));\n       STMT_VINFO_VECTYPE (call_stmt_info) = SLP_TREE_VECTYPE (node);\n-      STMT_VINFO_SLP_VECT_ONLY_PATTERN (call_stmt_info) = true;\n \n       /* Since we are replacing all the statements in the group with the same\n \t thing it doesn't really matter.  So just set it every time a new stmt\n@@ -1625,7 +1624,6 @@ addsub_pattern::build (vec_info *vinfo)\n \tSTMT_VINFO_RELEVANT (new_rep) = vect_used_in_scope;\n \tSTMT_SLP_TYPE (new_rep) = pure_slp;\n \tSTMT_VINFO_VECTYPE (new_rep) = SLP_TREE_VECTYPE (node);\n-\tSTMT_VINFO_SLP_VECT_ONLY_PATTERN (new_rep) = true;\n \tSLP_TREE_CODE (node) = ERROR_MARK;\n \tSLP_TREE_LANE_PERMUTATION (node).release ();\n \n@@ -1691,7 +1689,6 @@ addsub_pattern::build (vec_info *vinfo)\n \tSTMT_VINFO_RELEVANT (new_rep) = vect_used_in_scope;\n \tSTMT_SLP_TYPE (new_rep) = pure_slp;\n \tSTMT_VINFO_VECTYPE (new_rep) = SLP_TREE_VECTYPE (node);\n-\tSTMT_VINFO_SLP_VECT_ONLY_PATTERN (new_rep) = true;\n \tSLP_TREE_CODE (node) = ERROR_MARK;\n \tSLP_TREE_LANE_PERMUTATION (node).release ();\n \ndiff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc\nindex 4fbad3b2adf..1a6a6c50025 100644\n--- a/gcc/tree-vect-slp.cc\n+++ b/gcc/tree-vect-slp.cc\n@@ -187,16 +187,6 @@ vect_free_slp_tree (slp_tree node)\n     if (child)\n       vect_free_slp_tree (child);\n \n-  /* If the node defines any SLP only patterns then those patterns are no\n-     longer valid and should be removed.  */\n-  stmt_vec_info rep_stmt_info = SLP_TREE_REPRESENTATIVE (node);\n-  if (rep_stmt_info && STMT_VINFO_SLP_VECT_ONLY_PATTERN (rep_stmt_info))\n-    {\n-      stmt_vec_info stmt_info = vect_orig_stmt (rep_stmt_info);\n-      STMT_VINFO_IN_PATTERN_P (stmt_info) = false;\n-      STMT_SLP_TYPE (stmt_info) = STMT_SLP_TYPE (rep_stmt_info);\n-    }\n-\n   delete node;\n }\n \ndiff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc\nindex b73243252c0..9e71f71fab7 100644\n--- a/gcc/tree-vectorizer.cc\n+++ b/gcc/tree-vectorizer.cc\n@@ -723,7 +723,6 @@ vec_info::new_stmt_vec_info (gimple *stmt)\n   STMT_VINFO_REDUC_IDX (res) = -1;\n   STMT_VINFO_REDUC_DEF (res) = NULL;\n   STMT_VINFO_SLP_VECT_ONLY (res) = false;\n-  STMT_VINFO_SLP_VECT_ONLY_PATTERN (res) = false;\n \n   if (is_a <loop_vec_info> (this)\n       && gimple_code (stmt) == GIMPLE_PHI\ndiff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h\nindex 89cf94dbe7e..bdc0180b4c3 100644\n--- a/gcc/tree-vectorizer.h\n+++ b/gcc/tree-vectorizer.h\n@@ -1646,10 +1646,6 @@ public:\n \n   /* True if this is only suitable for SLP vectorization.  */\n   bool slp_vect_only_p;\n-\n-  /* True if this is a pattern that can only be handled by SLP\n-     vectorization.  */\n-  bool slp_vect_pattern_only_p;\n };\n \n /* Information about a gather/scatter call.  */\n@@ -1728,7 +1724,6 @@ struct gather_scatter_info {\n #define STMT_VINFO_REDUC_CODE(S)\t(S)->reduc_code\n #define STMT_VINFO_REDUC_DEF(S)\t\t(S)->reduc_def\n #define STMT_VINFO_SLP_VECT_ONLY(S)     (S)->slp_vect_only_p\n-#define STMT_VINFO_SLP_VECT_ONLY_PATTERN(S) (S)->slp_vect_pattern_only_p\n #define STMT_VINFO_REDUC_VECTYPE_IN(S)  (S)->reduc_vectype_in\n \n #define DR_GROUP_FIRST_ELEMENT(S) \\\n","prefixes":["2/2"]}