[PATCH 6/6] vect: Split vectorizable_lc_phi

2025-05-06 Thread andre.simoesdiasvieira
Remove the gimple ** argument that is no longer needed from vectorizable_lc_phi and vect_transform_lc_phi. --- gcc/tree-vect-loop.cc | 4 ++-- gcc/tree-vect-stmts.cc | 4 ++-- gcc/tree-vectorizer.h | 6 ++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gcc/tree-vect-loop.cc

[PATCH 2/6] vect: Remove non-SLP path from vectorizable_reduction

2025-05-06 Thread andre.simoesdiasvieira
Prunes code from the trivial true/false conditions. --- gcc/tree-vect-loop.cc | 540 -- 1 file changed, 155 insertions(+), 385 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 69b692f1673..4ab7d227e42 100644 --- a/gcc/tree-vect

[PATCH 4/6] vect: Remove non-SLP path from vectorizable_reduction

2025-05-06 Thread andre.simoesdiasvieira
Folds loops that used ncopies and now no longer need to be loops --- gcc/tree-vect-loop.cc | 51 +++ 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index c47ebc564c7..b2fa2703d34 100644 --- a/gc

[PATCH 0/6] Remove non-SLP path from vectorizable_reduction

2025-05-06 Thread andre.simoesdiasvieira
From: Andre Vieira Somewhat following richi's example of SLP cleanup, this patch series cleansup SLP code for vectorizable_reduction and friends. 1) fold trivially true/false conditions based on the slp_node argument without code block removal/reindent, etc. 2) do trivial dead code elimin

[PATCH 1/6] vect: Remove non-SLP path from vectorizable_reduction

2025-05-06 Thread andre.simoesdiasvieira
This replaces trivially to fold conditions. --- gcc/tree-vect-loop.cc | 90 +-- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 3de1ea646b4..69b692f1673 100644 --- a/gcc/tree-vect-loop.cc +

[PATCH 5/6] vect: Split vectorizable_lc_phi

2025-05-06 Thread andre.simoesdiasvieira
Split up vectorizable_lc_phi and create a vect_transform_lc_phi. --- gcc/tree-vect-loop.cc | 30 +- gcc/tree-vect-stmts.cc | 4 ++-- gcc/tree-vectorizer.h | 2 ++ 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect

[PATCH 3/6] vect: Remove non-SLP path from vectorizable_reduction

2025-05-06 Thread andre.simoesdiasvieira
This removes the non-SLP paths from vectorizable_conversion and in the process eliminates uses of 'ncopies' and removes 'get_initial_def_for_reduction'. Not done anything about STMT_VINFO_VECTYPE as I'm not sure about its uses in vectorizable_reduction in relation to the vectype_in/out. ---