On Mon, 18 May 2026 08:55:46 GMT, Roland Westrelin <[email protected]> wrote:

> Do we need both C2_CONTROL_DEPENDENT_LOAD and `C2_UNKNOWN_CONTROL_LOAD here?

I took this from `ArrayCopyNode::load` where we have both as well (I think you 
did that with JDK-8323274 :slightly_smiling_face: ). We also have both in a few 
other places, for example in the `needs_range_check` branch in 
`Parse::array_load` (added with JDK-8333889).

> Also, if the value is known null free and non atomic at compile time (the 
> runtime checks control fold and the loads are control dependent on the range 
> check), wouldn't we want to not pin the load?

You mean if the array layout is known at compile time and the load is directly 
below the the range check? Yes, I think in that case we would want to not pin 
the load. Seems a bit risky / non-trivial though. Are you fine with deferring 
to a follow-up enhancement?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2445#discussion_r3257641911

Reply via email to