RFR: 8257625: C2: Harden input checks in vector intrinsics

Vladimir Ivanov vlivanov at openjdk.java.net
Wed Dec 2 23:59:58 UTC 2020


On Wed, 2 Dec 2020 23:14:13 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Starting code and checks in vectorIntrinsics.cpp intrinsics is very repetitive.
> Is it possible to facto it into one for some of them?

Yes, I agree. I have some ideas on how to improve the situation, but want to address it as a separate enhancement.
In this PR I'd like to focus on fixing the bug.

> src/hotspot/share/opto/vectornode.cpp line 195:
> 
>> 193:     // Unimplemented for subword types since bit count changes
>> 194:     // depending on size of lane (and sign bit).
>> 195:     return 0;
> 
> Above comment should be changes.

Do you think so? It is related to `PopCountI`, precedes `(bt == T_INT)` check and clearly states it's about subword types.

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

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


More information about the hotspot-compiler-dev mailing list