[Bug tree-optimization/123153] [16 regression] gcc/tree-vect-loop-manip.cc:1979: -Wliteral-conversion
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 18 11:08:11 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123153
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Victor Do Nascimento
<victorldn@gcc.gnu.org>:
https://gcc.gnu.org/g:24bf392581ea6d931afc1e97d90d6a2d6bdaa183
commit r16-6243-g24bf392581ea6d931afc1e97d90d6a2d6bdaa183
Author: Victor Do Nascimento <victor.donascimento@arm.com>
Date: Wed Dec 17 14:43:41 2025 +0000
Fix profile_probability constructor arg [PR123153]
Given that profile probability is computed as an unsigned integer
value in the [0, max_probability = (uint32_t) 1 << (n_bits - 2)]
range (as opposed to a [0, 1] float), 50/50 likeihoods are encoded as
`even()', mapping to `max_probability / 2'.
The previous use of 0.5 for an even probability was, as a consequence
of the implicit `double' -> `uint32_t' conversion, silently set to 0 by
GCC when not using the `-Wconversion' flag.
We therefore replace the erroneous `probability (0.5, GUESSED)'
initialization with its correct `profile_probability::even ()'
counterpart.
gcc/ChangeLog:
PR tree-optimization/123153
* tree-vect-loop-manip.cc
(slpeel_tree_duplicate_loop_to_edge_cfg): use
profile_probability::even () for even likelihood.
More information about the Gcc-bugs
mailing list