]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid double profile udpate in try_peel_loop
authorJan Hubicka <jh@suse.cz>
Sun, 16 Jul 2023 21:53:56 +0000 (23:53 +0200)
committerJan Hubicka <jh@suse.cz>
Sun, 16 Jul 2023 21:53:56 +0000 (23:53 +0200)
commit1d203d4c90adb064edfa9680768d1f83a41f17e0
treea84977faaec69674e0a3573d3fac2df02a283ef4
parentd76d19c9bc5ef1138af65fa3546eb628b7a756c9
Avoid double profile udpate in try_peel_loop

try_peel_loop uses gimple_duplicate_loop_body_to_header_edge which subtracts the profile
from the original loop. However then it tries to scale the profile in a wrong way
(it forces header count to be entry count).

This eliminates to profile misupdates in the internal loop of sphinx3.

gcc/ChangeLog:

PR middle-end/110649
* tree-ssa-loop-ivcanon.cc (try_peel_loop): Avoid double profile update.
gcc/tree-ssa-loop-ivcanon.cc