RFR: 8256730: Code that uses Object.checkIndex() range checks doesn't optimize well
Roland Westrelin
roland at openjdk.java.net
Fri Nov 20 09:48:09 UTC 2020
This was reported by Paul with the vector API. There are 2 issues:
- CastII nodes (added by Objects.checkIndex()) gets in the way of the
pattern matching performed by range check elimination
- By transforming (CastII (AddI x y)) into (AddI (CastII x) (CastII y))
some CastII can be eliminated which improves address computation code.
-------------
Commit messages:
- step over CastII in range checks & push CastII thru add
Changes: https://git.openjdk.java.net/jdk/pull/1342/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1342&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8256730
Stats: 181 lines in 5 files changed: 116 ins; 55 del; 10 mod
Patch: https://git.openjdk.java.net/jdk/pull/1342.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1342/head:pull/1342
PR: https://git.openjdk.java.net/jdk/pull/1342
More information about the hotspot-compiler-dev
mailing list