]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix profile update in tree-ssa-loop-im.cc
authorJan Hubicka <jh@suse.cz>
Thu, 27 Jul 2023 13:58:52 +0000 (15:58 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 27 Jul 2023 13:58:52 +0000 (15:58 +0200)
commit5b06b3b8771d0dc06426986be32b8599e97bb451
treef7590fbe8766ab3e6bf9dd7acc200f21e7fb5277
parent499b8079a6419bb8082de062ec30772296c6700c
Fix profile update in tree-ssa-loop-im.cc

This fixes two bugs in tree-ssa-loop-im.cc.  First is that cap probability is not
reliable, but it is constructed with adjusted quality.  Second is that sometimes
the conditional has wrong joiner BB count.  This is visible on
testsuite/gcc.dg/pr102385.c however the testcase triggers another profile
update bug in pcom, so I will update it in followup patch.

gcc/ChangeLog:

* tree-ssa-loop-im.cc (execute_sm_if_changed): Turn cap probability
to guessed; fix count of new_bb.
gcc/tree-ssa-loop-im.cc