]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fixup vect_remove_slp_scalar_calls
authorRichard Biener <rguenther@suse.de>
Thu, 30 Jan 2025 14:37:05 +0000 (15:37 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 1 May 2025 11:46:04 +0000 (13:46 +0200)
There's a logic error for vect_remove_slp_scalar_calls where it
simply ignores pattern stmts but it should instead look at the
original stmt.

* tree-vect-slp.cc (vect_remove_slp_scalar_calls): Look
at the original stmt.

gcc/tree-vect-slp.cc

index b5a9604d074eab37be2557cf259d2fe068ebf879..9bf142d0faf571eb10d13e3f00049fb637b81471 100644 (file)
@@ -11361,12 +11361,12 @@ vect_remove_slp_scalar_calls (vec_info *vinfo,
     {
       if (!stmt_info)
        continue;
+      if (!PURE_SLP_STMT (stmt_info))
+       continue;
+      stmt_info = vect_orig_stmt (stmt_info);
       gcall *stmt = dyn_cast <gcall *> (stmt_info->stmt);
       if (!stmt || gimple_bb (stmt) == NULL)
        continue;
-      if (is_pattern_stmt_p (stmt_info)
-         || !PURE_SLP_STMT (stmt_info))
-       continue;
       lhs = gimple_call_lhs (stmt);
       if (lhs)
        new_stmt = gimple_build_assign (lhs, build_zero_cst (TREE_TYPE (lhs)));