RFR: 8351950: C2: masked vector MIN/MAX AVX512: SIGFPE / no valid evex tuple_table entry
Jatin Bhateja
jbhateja at openjdk.org
Sun May 4 07:54:55 UTC 2025
PR adds missing EVEX compressed displacement attributes used for computing the scale factor (N) of compressed displacement.
AVX512 memory operand instructions use compressed disp8 encoding if the displacement is a multiple of scale (N), which depends on Vector Length, embedded broadcasting, and lane size. Please refer to section 2.7.5 of Intel SDM for more details.
e.g., Consider two instructions, one with displacement 0x10203040 and the other with displacement 0x40, instruction operates over full 64-byte vector hence scale N = 64. Displacement of latter instruction is a multiple of scale, thus can be represented by 1 byte displacement encoding, while the former requires 4 bytes to represent displacement in instruction encoding.
1) vpternlogq $0xff,0x10203040(%r20,%r21,8),%zmm23,%zmm24
EVEX OP MR SIB DISP IMM
--------------|----|----|----|---------------|-----|
62 6b c1 40 25 84 ec 40 30 20 10 ff
2) vpternlogq $0xff,0x40(%r20,%r21,8),%zmm23,%zmm24
For full vector width operation, scalar matches with vector size, hence scale N = 64
effective displacement / compressed DISP8 = OFFSET(64) / 64 = 0x1
EVEX OP MR SIB DISP IMM
-------------|----|---|---|-----------|---|
62 6b c1 40 25 44 ec 01 ff
Kindly review and share your feedback.
Best Regards,
Jatin
-------------
Commit messages:
- 8351950: C2: masked vector MIN/MAX AVX512: SIGFPE / no valid evex tuple_table entry
Changes: https://git.openjdk.org/jdk/pull/25021/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25021&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8351950
Stats: 4047 lines in 37 files changed: 4046 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/25021.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25021/head:pull/25021
PR: https://git.openjdk.org/jdk/pull/25021
More information about the hotspot-compiler-dev
mailing list