public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/switch-lowering-fix-profile)] Fix one more case.
@ 2022-01-25 16:00 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-01-25 16:00 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0519d9494c0097ce0bc781956b7acea72da92f88
commit 0519d9494c0097ce0bc781956b7acea72da92f88
Author: Martin Liska <mliska@suse.cz>
Date: Tue Jan 25 09:16:56 2022 +0100
Fix one more case.
Diff:
---
gcc/tree-switch-conversion.cc | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-switch-conversion.cc b/gcc/tree-switch-conversion.cc
index 7aeb12c5ec9..4d90e820c08 100644
--- a/gcc/tree-switch-conversion.cc
+++ b/gcc/tree-switch-conversion.cc
@@ -1908,9 +1908,13 @@ switch_decision_tree::try_switch_expansion (vec<cluster *> &clusters)
/* Emit cluster-specific switch handling. */
for (unsigned i = 0; i < clusters.length (); i++)
if (clusters[i]->get_type () != SIMPLE_CASE)
- clusters[i]->emit (index_expr, index_type,
- gimple_switch_default_label (m_switch),
- m_default_bb, gimple_location (m_switch));
+ {
+ edge e = single_pred_edge (clusters[i]->m_case_bb);
+ e->dest->count = e->src->count.apply_probability (e->probability);
+ clusters[i]->emit (index_expr, index_type,
+ gimple_switch_default_label (m_switch),
+ m_default_bb, gimple_location (m_switch));
+ }
}
fix_phi_operands_for_edges ();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-25 16:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 16:00 [gcc(refs/users/marxin/heads/switch-lowering-fix-profile)] Fix one more case Martin Liska
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).