]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix profile count comparison.
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 23 Sep 2022 01:12:01 +0000 (18:12 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Tue, 27 Sep 2022 23:46:42 +0000 (16:46 -0700)
commit6bf473089f3c0c6ecf101f87f705618b1707fa82
tree1dbd38db0e1d892b18cdef2f6d3c3625c8645de3
parent772d532e0ba1e4b22c2b7d576e14b34ee929c093
Fix profile count comparison.

The comparison was incorrect when the counts weren't PRECISE.
For example, crossmodule-indir-call-topn-1.c was failing
with AutoFDO: when count_sum is 0 with quality AFDO,
count_sum > profile_count::zero() evaluates to true. Taking that
branch then leads to an assert in the call to to_sreal().

Tested on x86_64-pc-linux-gnu.

gcc/ChangeLog:

* ipa-cp.cc (good_cloning_opportunity_p): Fix profile count comparison.
gcc/ipa-cp.cc