https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Yao from comment #0)
> Having the ability to specify __builtin_unpredictable() as a hint to
> encourage the compiler to use cmov would be useful for implementing
> algorithms like binary search that have unpredictable branches.
> __builtin_expect_with_probability() looks like a possible substitute, but
> Clang does not support it and it does not always work as described in
> #110001.

PR 110001 has nothing to do with __builtin_expect_with_probability and
__builtin_expect_with_probability will do exactly the same as
__builtin_unpredictable will do really.

Reply via email to