diff options
author | Richard Biener <rguenther@suse.de> | 2024-06-26 19:23:26 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-06-27 07:52:51 +0200 |
commit | c7cb0dd94589ab501bca27f93641b4074e5a2e99 (patch) | |
tree | 11d6bca19be692905620aff9fff1d18eb795805d /gcc | |
parent | b7ba0670a768e76e87e04cfd6a72c28c35333b54 (diff) | |
download | gcc-c7cb0dd94589ab501bca27f93641b4074e5a2e99.zip gcc-c7cb0dd94589ab501bca27f93641b4074e5a2e99.tar.gz gcc-c7cb0dd94589ab501bca27f93641b4074e5a2e99.tar.bz2 |
tree-optimization/115652 - amend last fix
The previous fix breaks in the degenerate case when the discovered
last_stmt is equal to the first stmt in the block since then we
undo a required stmt advancement.
PR tree-optimization/115652
* tree-vect-slp.cc (vect_schedule_slp_node): Only insert
at the start of the block if that strictly dominates
the discovered dependent stmt.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-vect-slp.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 1f5b3fc..1252b61 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -9747,7 +9747,8 @@ vect_schedule_slp_node (vec_info *vinfo, { gimple_stmt_iterator si2 = gsi_after_labels (LOOP_VINFO_LOOP (loop_vinfo)->header); - if (vect_stmt_dominates_stmt_p (last_stmt, *si2)) + if (last_stmt != *si2 + && vect_stmt_dominates_stmt_p (last_stmt, *si2)) si = si2; } } |