RFR: 8351666: [PPC64] Make non-volatile VectorRegisters available for C2 register allocation [v24]
Martin Doerr
mdoerr at openjdk.org
Wed May 14 10:40:01 UTC 2025
On Wed, 14 May 2025 08:17:19 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Martin Doerr has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 35 additional commits since the last revision:
>>
>> - Improve readability of LXVX_OPCODE.
>> - Merge remote-tracking branch 'origin' into 8351666_PPC64_nv_VRs
>> - Add comment and clean up extra whitespaces.
>> - Merge remote-tracking branch 'origin' into 8351666_PPC64_nv_VRs
>> - Merge remote-tracking branch 'origin' into 8351666_PPC64_nv_VRs
>> - Make order of MachRegisters consistent with ConcreteRegisterImpl and simplify rc_class.
>> - Rewrite rc_class avoiding hard coded register numbers.
>> - Add comment regarding 8-Byte aligned stack slots for VecX.
>> - Add missing VSRs to RegisterSaver_LiveVSReg.
>> - Merge remote-tracking branch 'origin' into 8351666_PPC64_nv_VRs
>> - ... and 25 more: https://git.openjdk.org/jdk/compare/fbbe0ea3...e3cc8bcd
>
> src/hotspot/cpu/ppc/ppc.ad line 2013:
>
>> 2011: int dst_offset = ra_->reg2offset(dst_lo);
>> 2012: if (PowerArchitecturePPC64 >= 9) {
>> 2013: if (is_aligned(dst_offset, 16)) {
>
> If `Matcher::_new_SP` would be aligned to 16 bytes then the offset here would always be also 16 byte aligned. Can be handled separately from this pr.
Changing to `_new_SP = OptoReg::Name(align_up(_in_arg_limit, (int)stack_alignment_in_slots()));` should solve it for PPC64. But I don't know if such a change would be appreciated for other platforms. Some platforms have larger vectors than `StackAlignmentInBytes` and they seem to work fine with 8 Byte aligned vector stack slots. PPC64 actually also works fine with the current alignment, except that it requires an additional add instruction which is a bit ugly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23987#discussion_r2088630777
More information about the hotspot-dev
mailing list