On Tue, 31 Mar 2026 07:12:30 GMT, Tobias Hartmann <[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 This pull request has now been integrated. Changeset: b520c2ad Author: Tobias Hartmann <[email protected]> URL: https://git.openjdk.org/valhalla/commit/b520c2ad5e9600ce739468dd8cea93f2fd07ef8e Stats: 30 lines in 4 files changed: 0 ins; 12 del; 18 mod 8381387: [lworld] C2 should fold prototype_header_offset loads Reviewed-by: chagedorn ------------- PR: https://git.openjdk.org/valhalla/pull/2281
