public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/rguenth/heads/vect-force-slp)] Relax COND_EXPR reduction vectorization SLP restriction
@ 2024-02-23 15:18 Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2024-02-23 15:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:74e754175ab794a1c17fdf63fdc840b1f3ed62b5
commit 74e754175ab794a1c17fdf63fdc840b1f3ed62b5
Author: Richard Biener <rguenther@suse.de>
Date: Fri Feb 23 16:16:38 2024 +0100
Relax COND_EXPR reduction vectorization SLP restriction
Allow one-lane SLP but for the case where we need to swap the arms.
* tree-vect-stmts.cc (vectorizable_condition): Allow
single-lane SLP, but not when we need to swap then and
else clause.
Diff:
---
gcc/tree-vect-stmts.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index ba3871a819fc..efe406640254 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -12068,7 +12068,7 @@ vectorizable_condition (vec_info *vinfo,
= STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)) != NULL;
if (for_reduction)
{
- if (slp_node)
+ if (slp_node && SLP_TREE_LANES (slp_node) > 1)
return false;
reduc_info = info_for_reduction (vinfo, stmt_info);
reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info);
@@ -12157,6 +12157,10 @@ vectorizable_condition (vec_info *vinfo,
cond_expr = NULL_TREE;
}
}
+ /* ??? The vectorized operand query below doesn't allow swapping
+ this way for SLP. */
+ if (slp_node)
+ return false;
std::swap (then_clause, else_clause);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/rguenth/heads/vect-force-slp)] Relax COND_EXPR reduction vectorization SLP restriction
@ 2024-05-13 14:27 Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2024-05-13 14:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1ba0215280e51f0cbc3c3867d6e8c07fc76694f8
commit 1ba0215280e51f0cbc3c3867d6e8c07fc76694f8
Author: Richard Biener <rguenther@suse.de>
Date: Fri Feb 23 16:16:38 2024 +0100
Relax COND_EXPR reduction vectorization SLP restriction
Allow one-lane SLP but for the case where we need to swap the arms.
* tree-vect-stmts.cc (vectorizable_condition): Allow
single-lane SLP, but not when we need to swap then and
else clause.
Diff:
---
gcc/tree-vect-stmts.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 72a9c144823c..8fef72cb9072 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -12105,7 +12105,7 @@ vectorizable_condition (vec_info *vinfo,
= STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)) != NULL;
if (for_reduction)
{
- if (slp_node)
+ if (slp_node && SLP_TREE_LANES (slp_node) > 1)
return false;
reduc_info = info_for_reduction (vinfo, stmt_info);
reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info);
@@ -12194,6 +12194,10 @@ vectorizable_condition (vec_info *vinfo,
cond_expr = NULL_TREE;
}
}
+ /* ??? The vectorized operand query below doesn't allow swapping
+ this way for SLP. */
+ if (slp_node)
+ return false;
std::swap (then_clause, else_clause);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-13 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 15:18 [gcc(refs/users/rguenth/heads/vect-force-slp)] Relax COND_EXPR reduction vectorization SLP restriction Richard Biener
2024-05-13 14:27 Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).