[Bug middle-end/81318] [8 regression] ICE in to_reg_br_prob_base, at profile-count.h:189

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 11 13:04:00 GMT 2017


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?


More information about the Gcc-bugs mailing list