On Thu, 21 Jan 2021 16:54:36 GMT, Paul Sandoz <[email protected]> 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. OK. 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. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/2127
