On Wed, 25 Feb 2026 13:36:50 GMT, Quan Anh Mai <[email protected]> wrote:

>> test/hotspot/jtreg/compiler/c2/irTests/ProfileAtTypeCheck.java line 242:
>> 
>>> 240:     @IR(phase = { CompilePhase.AFTER_PARSING }, counts = { 
>>> IRNode.SUBTYPE_CHECK, "2" })
>>> 241:     // TODO 8375442: Should be folded as early as ITER_GVN1
>>> 242:     @IR(phase = { CompilePhase.BEFORE_MACRO_EXPANSION }, counts = { 
>>> IRNode.SUBTYPE_CHECK, "1" })
>> 
>> Why is this needed?
>
> It is because originally, the 2 `If`s are too far from each other for 
> `IfNode::Ideal` to fold. This PR induces a random change in the IGVN order 
> which prevents the dominated `If` from being enqueued and folded in the first 
> IGVN invocation. As a result, it is only processed later.

Thanks for the explanation - makes sense. Could you please file a tracking RFE 
in Valhalla to revert this once JDK-8375442 got merged?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2163#discussion_r2853118515

Reply via email to