From 52d3352239f73d3c165550177b4fe917760b85f9 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 30 Jan 2025 15:37:05 +0100 Subject: Fixup vect_remove_slp_scalar_calls 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index b5a9604..9bf142d 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -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 (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))); -- cgit v1.1