https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101301
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Liska <mar...@gcc.gnu.org>: https://gcc.gnu.org/g:4fa25a7eb322f0a003c1eb15680c71ece345e01e commit r13-4409-g4fa25a7eb322f0a003c1eb15680c71ece345e01e Author: Martin Liska <mli...@suse.cz> Date: Mon Jan 24 15:45:38 2022 +0100 Improve profile handling in switch lowering. PR tree-optimization/101301 PR tree-optimization/103680 gcc/ChangeLog: * tree-switch-conversion.cc (bit_test_cluster::emit): Handle correctly remaining probability. (switch_decision_tree::try_switch_expansion): Fix BB's count where a cluster expansion happens. (switch_decision_tree::emit_cmp_and_jump_insns): Fill up also BB count. (switch_decision_tree::do_jump_if_equal): Likewise. (switch_decision_tree::emit_case_nodes): Handle special case for BT expansion which can also fallback to a default BB. * tree-switch-conversion.h (cluster::cluster): Add m_default_prob probability.