[jdk11u-dev] RFR: 8223347: Integration of Vector API (Incubator)

Vladimir Kempik vkempik at openjdk.java.net
Wed Oct 6 18:13:21 UTC 2021


The backport can't be applied clean to jdk11 ( due to the miss of 8223347: Integration of Vector API (Incubator) )  and needed big rework.

The main idea behind the backport is to add new check to functions with VecS or VecD argument ( those who can read less than 16 bytes from memory) and not touch VecX/VecY/VecZ types.

The problematic place before the patch :

  0x000000011dd55603: vmovq  0x10(%r10,%rsi,1),%xmm0
  0x000000011dd5560a: vpxor  0x10(%r11,%rsi,1),%xmm0,%xmm0
  0x000000011dd55611: vmovq  %xmm0,0x10(%r13,%rsi,1)  ;*bastore {reexecute=0 rethrow=0 return_oop=0}
                                                ; - repro::xor_array at 18 (line 12)

and after the patch:

  0x000000011f9a4d95: vmovq  0x10(%r11,%rsi,1),%xmm0
  0x000000011f9a4d9c: vmovq  0x10(%r10,%rsi,1),%xmm1
  0x000000011f9a4da3: vpxor  %xmm1,%xmm0,%xmm0
  0x000000011f9a4da7: vmovq  %xmm0,0x10(%r13,%rsi,1)  ;*bastore {reexecute=0 rethrow=0 return_oop=0}
                                                ; - repro::xor_array at 18 (line 12)

Testing is pending.

Also fixed a typo at https://github.com/openjdk/jdk11u-dev/pull/488/files#diff-d6a3624f0f0af65a98a47378a5c146eed5016ca09b4de1acd0a3acc823242e82L9069

-------------

Commit messages:
 - 8267652: c2 loop unrolling by 8 results in reading memory past array

Changes: https://git.openjdk.java.net/jdk11u-dev/pull/488/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=488&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8223347
  Stats: 58 lines in 1 file changed: 34 ins; 0 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk11u-dev/pull/488.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/488/head:pull/488

PR: https://git.openjdk.java.net/jdk11u-dev/pull/488


More information about the jdk-updates-dev mailing list