Withdrawn: 8333721: C2: vectorization causes incorrect execution with unsafe and negative scale
Roland Westrelin
roland at openjdk.org
Thu Jun 13 14:00:25 UTC 2024
On Thu, 6 Jun 2024 13:23:42 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> This was initially a regresion from 8324517 (C2: crash in compiled
> code because of dependency on removed range check CastIIs): 8332677
> (jck test api/java_math/BigInteger/Bitwise.html fails (c2) on
> aarch64). A simplified test case for that one is:
>
>
> private static void test1(byte[] array, int start) {
> for (int i = start; i < array.length; i++) {
> array[array.length - i - 1] = 0x42;
> }
> }
>
>
> That method is vectorized but with 8324517, the resulting compiled
> code is incorrect. I don't think that failure can be reproduced
> without 8324517 other than by using unsafe which is what the included
> test case does (I'll include the test method above in the redo of
> 8324517).
>
> The bug is that `VPointer::scaled_iv_plus_offset()` computes an
> incorrect offset when `n` is a `Sub` node and the scaled iv is on
> input 2 of the `Sub` node and input 2 also includes an offset
> component. In that case, the offset from input 2 is added to the
> `VPointer` instead of being subtracted.
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk/pull/19577
More information about the hotspot-compiler-dev
mailing list