public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5492] Fix ICE with SLP and -fdbg-cnt
@ 2023-11-15 12:12 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-11-15 12:12 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:bcef48b59e4b4f86595929b490a8303da1239ac0
commit r14-5492-gbcef48b59e4b4f86595929b490a8303da1239ac0
Author: Richard Biener <rguenther@suse.de>
Date: Wed Nov 15 09:49:31 2023 +0100
Fix ICE with SLP and -fdbg-cnt
We have to clear the visited flag on stmts.
* tree-vect-slp.cc (vect_slp_region): Also clear visited flag when
we skipped an instance due to -fdbg-cnt.
Diff:
---
gcc/tree-vect-slp.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 80e279d8f50..33c4d1308f6 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -7652,6 +7652,7 @@ vect_slp_region (vec<basic_block> bbs, vec<data_reference_p> datarefs,
bb_vinfo->shared->check_datarefs ();
+ bool force_clear = false;
auto_vec<slp_instance> profitable_subgraphs;
for (slp_instance instance : BB_VINFO_SLP_INSTANCES (bb_vinfo))
{
@@ -7674,15 +7675,17 @@ vect_slp_region (vec<basic_block> bbs, vec<data_reference_p> datarefs,
vect_location = saved_vect_location;
if (!dbg_cnt (vect_slp))
- continue;
+ {
+ force_clear = true;
+ continue;
+ }
profitable_subgraphs.safe_push (instance);
}
/* When we're vectorizing an if-converted loop body make sure
we vectorized all if-converted code. */
- if (!profitable_subgraphs.is_empty ()
- && orig_loop)
+ if ((!profitable_subgraphs.is_empty () || force_clear) && orig_loop)
{
gcc_assert (bb_vinfo->bbs.length () == 1);
for (gimple_stmt_iterator gsi = gsi_start_bb (bb_vinfo->bbs[0]);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-15 12:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 12:12 [gcc r14-5492] Fix ICE with SLP and -fdbg-cnt Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).