RFR: JDK-8270340: Base64 decodeBlock intrinsic for Power64 needs cleanup

Martin Doerr mdoerr at openjdk.java.net
Thu Jul 15 18:51:10 UTC 2021


On Thu, 15 Jul 2021 17:27:04 GMT, Corey Ashford <cashford at openjdk.org> wrote:

>> src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 3995:
>> 
>>> 3993:         __ align_prefix(); __ xxpermx(xlate_b, table_64_79, table_80_95, input->to_vsr(), 2);
>>> 3994:         __ xxlor(xlate_b, xlate_a, xlate_b);
>>> 3995:         __ align_prefix(); __ xxpermx(xlate_a, table_96_111, table_112_127, input->to_vsr(), 3);
>> 
>> This is just a reminder comment.  align_prefix() does nothing when loop_unrolls is 1 because the label unrolled_loop_start is aligned to a 32-byte boundary and these three prefixed instructions are within 32bytes after the label, and thus, they never cross a 64-byte boundary.  Since the comment above mentions that the best unrolling factor here is 1, align_prefix() are just safe guards for the case someone try to unroll this loop.
>
> That's a good point. Initially I had removed the align_prefix() calls for that reason and added a comment about why they weren't needed, but it burnt me when I was testing an unroll value of 4.
> I will put in a comment like you asked.

I guess we will never change the unroll factor. Why not clean it up?

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

PR: https://git.openjdk.java.net/jdk/pull/4762


More information about the hotspot-dev mailing list