RFR: 8259925: [Vector API] Unreasonable IndexOutOfBoundsException message when length < vlen

Jie Fu jiefu at openjdk.java.net
Thu Jan 21 23:40:28 UTC 2021

On Thu, 21 Jan 2021 16:54:36 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> The intrinsic enables C2 to more reliably elide bounds checks. I don't know the exact details but at a high-level it transforms signed values into unsigned values (and therefore the signed comparisons become unsigned comparisons), which helps C2 remove checks when there is a dominating check of, for example, an upper loop bound.

Now I can understand what you are worrying about.
Thanks for your clarification.

> You say "the intrinsified Objects.checkIndex seems to generate more code than inlined if-statements". Can you present some examples of Java code and the corresponding C2 generated assembler where this happens?

Will do it later.


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

More information about the core-libs-dev mailing list