RFR: 8257625: C2: Harden input checks in vector intrinsics
Vladimir Ivanov
vlivanov at openjdk.java.net
Wed Dec 2 21:15:04 UTC 2020
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
-------------
Commit messages:
- 8257625: C2: Harden input checks in vector intrinsics
Changes: https://git.openjdk.java.net/jdk/pull/1575/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1575&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8257625
Stats: 230 lines in 3 files changed: 62 ins; 45 del; 123 mod
Patch: https://git.openjdk.java.net/jdk/pull/1575.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1575/head:pull/1575
PR: https://git.openjdk.java.net/jdk/pull/1575
More information about the hotspot-compiler-dev
mailing list