On Tue, 31 Mar 2026 09:08:14 GMT, Christian Hagedorn <[email protected]> 
wrote:

>> If Valhalla is enabled, we need to load the prototype header on allocations: 
>> https://github.com/openjdk/valhalla/blob/2c6b468f488147e6851a719e7cd821773c29a8ea/src/hotspot/share/opto/callnode.cpp#L2030-L2032
>> 
>> This load should be folded, if possible. I enabled the corresponding 
>> optimization in `LoadNode::Value` and also had to adjust the code in 
>> `AndLNode::Ideal` to account for the load now being folded. Since this code 
>> is becoming increasingly complex, I filed 
>> [JDK-8381388](https://bugs.openjdk.org/browse/JDK-8381388) to simplify it by 
>> implementing the mark word test as a macro node.
>> 
>> I also removed the unused`ciKlass::prototype_header_offset`.
>> 
>> Thanks,
>> Tobias
>
> src/hotspot/share/opto/mulnode.cpp line 852:
> 
>> 850:   }
>> 851: 
>> 852:   // Search for GraphKit::mark_word_test patterns and fold the test if 
>> the result is statically known
> 
> Some comments or graph sketch on the expected patterns would help but to 
> understand the code better but since we are planning to refactor this 
> anyways, feel free to do that later.

Yes, I agree but decided to not add those for this particular reason.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2281#discussion_r3014611026

Reply via email to