RFR: 8257625: C2: Harden input checks in vector intrinsics
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri Dec 4 07:57:59 UTC 2020
On Fri, 4 Dec 2020 07:37:34 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Input validation in vector intrinsics is not robust enough to filter out all problematic cases.
>>
>> Initially, vector intrinsics were fed with constant values, but after recent API refactoring the implementation started to rely more on JIT abilities to optimize complex code shapes and it exposed the intrinsics to some pathological case caused by operation in effectively dead code (JIT can't prove the code is dead, but it's never executed in practive) where different paradoxes are observed (e.g., arguments have impossible values) or dying parts of the graph.
>>
>> The fix is to strengthen input validation and bail out when TOP or unexpected values are observed.
>>
>> (Surprisingly, incremental inlining turned out to be quite good at stressing those situations. My guess is it's the result of delayed/bulk cleanup between iteration attempts.)
>>
>> Testing:
>> - [x] jdk/incubator/vector w/ and w/o -XX:+AlwaysIncrementalInline
>
> Looks good to me.
Thanks for the reviews, Vladimir and Tobias.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1575
More information about the hotspot-compiler-dev
mailing list