This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/81318] [8 regression] ICE in to_reg_br_prob_base, at profile-count.h:189
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Aug 2017 13:04:19 +0000
- Subject: [Bug middle-end/81318] [8 regression] ICE in to_reg_br_prob_base, at profile-count.h:189
- Auto-submitted: auto-generated
- References: <bug-81318-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81318
--- Comment #22 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 41976
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41976&action=edit
Patch candidate
So I believe that problem is hidden in determine_unlikely_bbs where we set
bb->count = profile_count::zero () for:
b ()
{
<bb 2> [0.00%] [count: INV]:
a ();
return;
}
I think it's not correct and we should set profile_count::guessed_zero ().
Similarly in similar situations in the function. Second problem is at the end
of function where we guard wrongly count assignment with dump_file presence.
That should be also fixed in the patch.
I was able to bootstrap, but ./gcc/testsuite/gcc.dg/compare2.c test-case fails
not. Can you please Honza take a look?