]> git.ipfire.org Git - thirdparty/gcc.git/commit
ldist: Fix probability on loop exit
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 9 Dec 2025 09:09:53 +0000 (01:09 -0800)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Fri, 12 Dec 2025 20:18:38 +0000 (12:18 -0800)
commitca6e6d317ca245682e8f06e3bb7cd6a76ffd0357
tree75bf45d8d15ca2560ad7257f5326282b093eb418
parent9f27ac9b83af5e01098481d4a776fabb53f63618
ldist: Fix probability on loop exit

While moving the phi part of removal of forwarder blocks,
I noticed that I was getting some failures due to "mismatch counts".
I worked around the issue by disabling the case where the forwarder
block would just get merged. I have now gone back and found
the problem is in ldist where it is removing the loop
by changing the exit to always exit but forgot to update
the edge to always probability. This fixes that and
also removes a few of the "mismatch counts".

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

PR tree-optimization/103680
* tree-loop-distribution.cc (destroy_loop): Set probability
of the exit edge to be always.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-loop-distribution.cc