public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Avoid vect_get_vector_types_for_stmt
@ 2022-07-29  6:28 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-07-29  6:28 UTC (permalink / raw)
  To: gcc-patches

This replaces vect_get_vector_types_for_stmt with get_vectype_for_scalar_type
in vect_recog_bool_pattern.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	* tree-vect-patterns.cc (vect_recog_bool_pattern): Use
	get_vectype_for_scalar_type instead of
	vect_get_vector_types_for_stmt.
---
 gcc/tree-vect-patterns.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
index dfbfb71b3c6..09574bb1a26 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -4509,10 +4509,8 @@ vect_recog_bool_pattern (vec_info *vinfo,
 	   && STMT_VINFO_DATA_REF (stmt_vinfo))
     {
       stmt_vec_info pattern_stmt_info;
-      tree nunits_vectype;
-      if (!vect_get_vector_types_for_stmt (vinfo, stmt_vinfo, &vectype,
-					   &nunits_vectype)
-	  || !VECTOR_MODE_P (TYPE_MODE (vectype)))
+      vectype = get_vectype_for_scalar_type (vinfo, TREE_TYPE (lhs));
+      if (!vectype || !VECTOR_MODE_P (TYPE_MODE (vectype)))
 	return NULL;
 
       if (check_bool_pattern (var, vinfo, bool_stmts))
-- 
2.35.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-29  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29  6:28 [PATCH] Avoid vect_get_vector_types_for_stmt 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).