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

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

Commit messages:
 - Missing check
 - JDK-8381387

Changes: https://git.openjdk.org/valhalla/pull/2281/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2281&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8381387
  Stats: 30 lines in 4 files changed: 0 ins; 12 del; 18 mod
  Patch: https://git.openjdk.org/valhalla/pull/2281.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2281/head:pull/2281

PR: https://git.openjdk.org/valhalla/pull/2281

Reply via email to