On Mon, 17 Feb 2025 08:37:56 GMT, Emanuel Peter <epe...@openjdk.org> wrote:

> > I suppose extracting the branch probability from the MethodData and 
> > attaching it to the Min/Max nodes is not impossible.
> 
> That is basically what `PhaseIdealLoop::conditional_move` already does, 
> right? It detects the diamond and converts it to `CMove`. We could special 
> case for `min / max`, and then we'd have the probability for the branch, 
> which we could store at the node.

Possibly. We could also create the intrinsic they way it's done in the patch 
and extract the frequency from the `MethoData` for the min or max methods. The 
shape of the bytecodes for these methods should be simple enough that it should 
be feasible.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20098#issuecomment-2662424292

Reply via email to