[gcc r17-3416] improve vect_optimize_slp_pass::containing_loop
Richard Biener via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:157cf7898dbdd43d39b2f2a9cf4390f0338d2ad3 commit r17-3416-g157cf7898dbdd43d39b2f2a9cf4390f0338d2ad3 Author: Richard Biener <[email protected]> Date: Tue Aug 18 14:21:39 2026 +0200 improve vect_optimize_slp_pass::containing_loop This aovids falling back to the loop root node when handling a VEC_PERM node. * tree-vect-slp.cc (vect_optimize_slp_pass::containing_loop): For nodes w/o representative use the region entry block to indicate the containing loop. Diff: --- gcc/tree-vect-slp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 1cff56f3099a..ab29e8996d20 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -6823,7 +6823,7 @@ vect_optimize_slp_pass::containing_loop (slp_tree node) { stmt_vec_info rep = SLP_TREE_REPRESENTATIVE (node); if (!rep) - return ENTRY_BLOCK_PTR_FOR_FN (cfun)->loop_father; + return m_vinfo->bbs[0]->loop_father; return gimple_bb (vect_orig_stmt (rep)->stmt)->loop_father; }