]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix handling of uninitialized counts in merge_blocks
authorJan Hubicka <jh@suse.cz>
Thu, 2 Oct 2025 13:25:08 +0000 (15:25 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 2 Oct 2025 13:25:41 +0000 (15:25 +0200)
gcc/ChangeLog:

* cfghooks.cc (merge_blocks): Fix typo in the previous change.

Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
gcc/cfghooks.cc

index 8b3346898aa26b2e64522d46b5cdf4d25a24f5f4..25bc5d4b2732f16903255c24b1cd2d41a7659bc9 100644 (file)
@@ -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;