]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix profile update in duplicat_loop_body_to_header_edge for loops with 0 count_in
authorJan Hubicka <jh@suse.cz>
Thu, 10 Aug 2023 17:01:43 +0000 (19:01 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 10 Aug 2023 17:01:43 +0000 (19:01 +0200)
commit937591d236e61d25b5677c29621f70e750a95709
tree6ac4594a24f39393a474180d0478c0240f9fa274
parent546bf79bd72df0e024323345a5d08f9ceba513f6
Fix profile update in duplicat_loop_body_to_header_edge for loops with 0 count_in

this patch makes duplicate_loop_body_to_header_edge to not drop profile counts to
uninitialized when count_in is 0.  This happens because profile_probability in 0 count
is undefined.

gcc/ChangeLog:

* cfgloopmanip.cc (duplicate_loop_body_to_header_edge): Special case loops with
0 iteration count.
gcc/cfgloopmanip.cc