On Thu, Apr 27, 2023 at 12:10:40PM +0000, Richard Biener wrote:
> The following generalizes the range-op for __builtin_expect
> by using the fnspec machinery.
>
> We've defered this to stage1 - bootstrapped and tested on
> x86_64-unknown-linux-gnu.
>
> OK?
>
> Thanks,
> Richard.
>
> PR tree-optimization/109170
> * gimple-range-op.cc (gimple_range_op_handler::maybe_builtin_call):
> Handle __builtin_expect and similar via cfn_pass_through_arg1
> and inspecting the calls fnspec.
> * builtins.cc (builtin_fnspec): Handle BUILT_IN_EXPECT
> and BUILT_IN_EXPECT_WITH_PROBABILITY.
Ok, thanks.
Jakub