RE: [EXTERNAL] Re: [PATCH] Fix count comparison in ipa-cp

2022-12-06 Thread Eugene Rozenfeld via Gcc-patches
r (int i = 0, j = 0; i < iterations; ++i, j = (j + 1) % 10) +array[j] = foo (); +} -- 2.25.1 -Original Message- From: Jeff Law Sent: Tuesday, November 22, 2022 12:03 PM To: Eugene Rozenfeld ; gcc-patches@gcc.gnu.org Subject: [EXTERNAL] Re: [PATCH] Fix count comparison in ipa-cp [You d

Re: [PATCH] Fix count comparison in ipa-cp

2022-11-22 Thread Jeff Law via Gcc-patches
On 11/21/22 14:26, Eugene Rozenfeld via Gcc-patches wrote: The existing comparison was incorrect for non-PRECISE counts (e.g., AFDO): we could end up with a 0 base_count, which could lead to asserts, e.g., in good_cloning_opportunity_p. gcc/ChangeLog: * ipa-cp.cc (ipcp_propagate_stag

[PATCH] Fix count comparison in ipa-cp

2022-11-21 Thread Eugene Rozenfeld via Gcc-patches
The existing comparison was incorrect for non-PRECISE counts (e.g., AFDO): we could end up with a 0 base_count, which could lead to asserts, e.g., in good_cloning_opportunity_p. gcc/ChangeLog: * ipa-cp.cc (ipcp_propagate_stage): Fix profile count comparison. --- gcc/ipa-cp.cc | 2 +- 1 f