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

Vladimir Ivanov vlivanov at openjdk.java.net
Fri Dec 4 07:58:01 UTC 2020


On Wed, 2 Dec 2020 19:27:53 GMT, Vladimir Ivanov <vlivanov 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

This pull request has now been integrated.

Changeset: 6845fee9
Author:    Vladimir Ivanov <vlivanov at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/6845fee9
Stats:     230 lines in 3 files changed: 62 ins; 45 del; 123 mod

8257625: C2: Harden input checks in vector intrinsics

Reviewed-by: thartmann

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

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


More information about the hotspot-compiler-dev mailing list