From 14010053dac93f64e34b4b71804bec7ec984b595 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 2 Oct 2025 15:25:08 +0200 Subject: [PATCH] Fix handling of uninitialized counts in merge_blocks gcc/ChangeLog: * cfghooks.cc (merge_blocks): Fix typo in the previous change. Co-authored-by: H.J. Lu --- gcc/cfghooks.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cfghooks.cc b/gcc/cfghooks.cc index 8b3346898aa..25bc5d4b273 100644 --- a/gcc/cfghooks.cc +++ b/gcc/cfghooks.cc @@ -819,7 +819,7 @@ merge_blocks (basic_block a, basic_block b) /* Pick the more reliable count. If both qualities agrees, pick the larger one since turning mistakely hot code to cold is more harmful. */ - if (a->count.initialized_p ()) + if (!a->count.initialized_p ()) a->count = b->count; else if (a->count.quality () < b->count.quality ()) a->count = b->count; -- 2.47.3