RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]
Sandhya Viswanathan
sviswanathan at openjdk.org
Fri Dec 16 23:29:57 UTC 2022
On Sun, 13 Nov 2022 20:57:44 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> src/hotspot/cpu/x86/x86_64.ad line 12073:
>>
>>> 12071: legRegD tmp_vec13, rRegI tmp1, rRegI tmp2, rRegI tmp3, rFlagsReg cr)
>>> 12072: %{
>>> 12073: predicate(UseAVX >= 2 && ((VectorizedHashCodeNode*)n)->mode() == VectorizedHashCodeNode::LATIN1);
>>
>> If you represent `VectorizedHashCodeNode::mode()` as an input, it would allow to abstract over supported modes and come up with a single AD instruction. Take a look at `VectorMaskCmp` for an example (not a perfect one though since it has both _predicate member and constant input which is redundant).
>
> Thanks for the pointer, I'll check it out!
I agree with Vladimir, adding mode as another input will help. Please take a look at the RoundDoubleModeNode.
-------------
PR: https://git.openjdk.org/jdk/pull/10847
More information about the hotspot-dev
mailing list