diff options
author | Richard Biener <rguenther@suse.de> | 2025-01-30 15:37:05 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-05-01 13:46:04 +0200 |
commit | 52d3352239f73d3c165550177b4fe917760b85f9 (patch) | |
tree | bac2b92254f5d567b6b3590ab28042128147cc21 /gcc | |
parent | 79aa2a283a8d3327ff4d6dca77e81d5b1ac3a01e (diff) | |
download | gcc-52d3352239f73d3c165550177b4fe917760b85f9.zip gcc-52d3352239f73d3c165550177b4fe917760b85f9.tar.gz gcc-52d3352239f73d3c165550177b4fe917760b85f9.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-vect-slp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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 <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))); |