On Sun, 13 Nov 2022 20:57:44 GMT, Claes Redestad <[email protected]> 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