JDK-8362594 : Aarch64: Fix JTREG test - hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java failure on 256-bit SVE machines
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • CPU: aarch64
  • Submitted: 2025-07-18
  • Updated: 2025-07-22
  • Resolved: 2025-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Resolved
Related Reports
Causes :  
Duplicate :  
Description
After this commit - https://github.com/openjdk/jdk/commit/a49ecb26c5ff2f949851937f3bb036d7946a103e the JTREG test - hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java fails for some of the tests which contain constant values such as - 

public void vectorAddConstInputFloat16() {
         for (int i = 0; i < LEN; ++i) {
             output[i] = float16ToRawShortBits(add(shortBitsToFloat16(input1[i]), FP16_CONST));
         }
     }

The failure that's observed - 

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/ent-user/ci-scripts/jdk_build/jdk_src/src/hotspot/cpu/aarch64/assembler_aarch64.hpp:3760), pid=2751988, tid=2752010
#  guarantee(false) failed: invalid immediate
#
# JRE version: OpenJDK Runtime Environment (26.0) (fastdebug build 26-internal-git-1b3cf1166)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 26-internal-git-1b3cf1166, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x47f128]  Assembler::sve_dup(FloatRegister, Assembler::SIMD_RegVariant, int)+0x128
#
# Core dump will be written. Default location: /tmp/core.2751988

This is because sve_dup instruction does not accept 16-bit immediates. The fix involves removing that part of the code.
Comments
Duplicate of https://bugs.openjdk.org/browse/JDK-8361582. Closing this and will follow up on the other one.
21-07-2025

Sounds good, thanks!
21-07-2025

[~thartmann] backport to JDK 25u should be okay with us. Thanks for considering this. I will close this issue and follow up on the other one opened previously.
21-07-2025

Thanks, I think this issue should be closed as duplicate of (earlier filed) JDK-8361582 then. A backport to JDK 25 would require making this a P2 + getting approval for backport which doesn't feel appropriate to me, given that JDK 25 is not directly affected. Wouldn't a backport to JDK 25u be sufficient?
21-07-2025

Hi [~thartmann] Thanks, I'll make the required changes. I think the tests won't fail in JDK25 as this patch is not available - https://github.com/openjdk/jdk/commit/a49ecb26c5ff2f949851937f3bb036d7946a103e in JDK-25 but the match rule for aarch64 is incorrect due to which this test fails. I understand that JDK25 is in RDP2 now but I was wondering if it is possible to target this change to JDK-25 as well? It would be good to have the correct instructions in the match rules. Also I just realized there's already another ticket opened for fixing this error - https://bugs.openjdk.org/browse/JDK-8361582
21-07-2025

ILW = Guarantee failure during C2 compilation, float16 test on AArch64 with 256-bit SVE, disable SVE or compilation of affected method = HLM = P3
21-07-2025

[~bkilambi] JDK-8352635 was integrated into JDK 26, so this does not affect JDK 25, right? I'm tentatively removing JDK 25 as affects version. Also, converted this to a bug. Could you please add the hs_err file or at least the stack trace? Please also change the title to something more descriptive. Thanks!
21-07-2025