public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1642] tree-optimization/101112 - fix pattern stmt def lookup in SLP reassoc
@ 2021-06-18 11:43 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-06-18 11:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:17a4bee01c3b29c5ccdd39f34384521e5d44135b

commit r12-1642-g17a4bee01c3b29c5ccdd39f34384521e5d44135b
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 18 12:20:22 2021 +0200

    tree-optimization/101112 - fix pattern stmt def lookup in SLP reassoc
    
    This fixes the lookup of a pattern stmt def operand.
    
    2021-06-18  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/101112
            * tree-vect-slp.c (vect_slp_linearize_chain): Fix condition
            to lookup a pattern stmt def.

Diff:
---
 gcc/tree-vect-slp.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 0c1f85beeb2..f9c33c0bb14 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1482,13 +1482,9 @@ vect_slp_linearize_chain (vec_info *vinfo,
 	  stmt_vec_info def_stmt_info;
 	  bool res = vect_is_simple_use (op, vinfo, &dt, &def_stmt_info);
 	  gcc_assert (res);
-	  if (dt == vect_internal_def)
-	    {
-	      stmt_vec_info orig_def_stmt_info = def_stmt_info;
-	      def_stmt_info = vect_stmt_to_vectorize (def_stmt_info);
-	      if (def_stmt_info != orig_def_stmt_info)
-		op = gimple_get_lhs (def_stmt_info->stmt);
-	    }
+	  if (dt == vect_internal_def
+	      && is_pattern_stmt_p (def_stmt_info))
+	    op = gimple_get_lhs (def_stmt_info->stmt);
 	  gimple *use_stmt;
 	  use_operand_p use_p;
 	  if (dt == vect_internal_def


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

only message in thread, other threads:[~2021-06-18 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 11:43 [gcc r12-1642] tree-optimization/101112 - fix pattern stmt def lookup in SLP reassoc 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).