On Thu, 30 Apr 2026 12:47:09 GMT, Tobias Hartmann <[email protected]> wrote:
> This patch addresses the C1 parts of > [JDK-8350865](https://bugs.openjdk.org/browse/JDK-8350865): [lworld] > Follow-up work from adding support for nullable, flat, atomic arrays / > fields. Comments in-line with the changes. > > Thanks, > Tobias > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Some small comments, otherwise, it looks good to me. src/hotspot/share/c1/c1_GraphBuilder.cpp line 1097: > 1095: PatchALot; > 1096: bool needs_atomic_access = array_klass->is_elem_atomic(); > 1097: can_delay_access = is_null_free && > C1UseDelayedFlattenedFieldReads && Since you only use `is_null_free` here, you can move the definition down. src/hotspot/share/c1/c1_Instruction.hpp line 991: > 989: > 990: Value buffer() const { return _buffer; } > 991: void set_buffer(Value buffer) { Suggestion: Value buffer() const { return _buffer; } void set_buffer(Value buffer) { src/hotspot/share/c1/c1_LIRGenerator.cpp line 1727: > 1725: if (index.result()->is_constant()) { > 1726: jint const_index = index.result()->as_jint(); > 1727: __ move(LIR_OprFact::longConst((jlong)const_index << shift), > index_op); You could use a `static_cast` instead: Suggestion: __ move(LIR_OprFact::longConst(static_cast<jlong>(const_index) << shift), index_op); ------------- Marked as reviewed by chagedorn (Committer). PR Review: https://git.openjdk.org/valhalla/pull/2380#pullrequestreview-4217873927 PR Review Comment: https://git.openjdk.org/valhalla/pull/2380#discussion_r3179764682 PR Review Comment: https://git.openjdk.org/valhalla/pull/2380#discussion_r3179801992 PR Review Comment: https://git.openjdk.org/valhalla/pull/2380#discussion_r3179820234
