On Tue, Mar 21, 2023 at 08:21:18AM +0000, Richard Biener wrote:
> On Mon, 20 Mar 2023, Jakub Jelinek wrote:
>
> > On Mon, Mar 20, 2023 at 12:12:14PM +0000, Richard Biener wrote:
> > > PR tree-optimization/109170
> > > * gimple-range-op.cc (cfn_pass_through_arg1): New.
> > > (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.
> >
> > I'm still worried about this builtins.cc change, can't we defer
> > that part till GCC 14 where there will be enough time to see if it
> > doesn't result in some undesirable problems (__builtin_expect* being
> > optimized away when it still shouldn't etc.)?
>
> Sure. I've retested and pushed the following.
Thanks.
Jakub