JDK-8275643 : C2's unaryOp vector intrinsic does not properly handle LongVector.neg
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17,18,repo-panama
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-10-20
  • Updated: 2022-02-03
  • Resolved: 2021-11-19
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 17 JDK 18
17.0.3-oracleFixed 18 b25Fixed
Related Reports
Relates :  
Relates :  
Description
Executing jdk/incubator/vector/* with -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 triggers:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/oracle/jdk/open/src/hotspot/share/prims/vectorSupport.cpp:297), pid=496845, tid=496853
#  fatal error: NEG: long

Current CompileTask:
C2:  21564 1175 %  b        Long128VectorTests::NEGLong128VectorTests @ 50 (115 bytes)

Stack: [0x00007f1c1e037000,0x00007f1c1e138000],  sp=0x00007f1c1e132840,  free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x191d4d5]  VectorSupport::vop2ideal(int, BasicType)+0x6b5
V  [libjvm.so+0x190df41]  LibraryCallKit::inline_vector_nary_operation(int)+0x7d1
V  [libjvm.so+0x12750e2]  LibraryIntrinsic::generate(JVMState*)+0x302
V  [libjvm.so+0x8262d0]  CallGenerator::do_late_inline_helper()+0xab0
V  [libjvm.so+0x9fea4d]  Compile::inline_incrementally_one()+0x33d
V  [libjvm.so+0x9fedaf]  Compile::inline_incrementally(PhaseIterGVN&)+0x18f
V  [libjvm.so+0x9ffa09]  Compile::Optimize()+0x5e9
V  [libjvm.so+0xa026ae]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x159e
V  [libjvm.so+0x81d2b6]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x646
V  [libjvm.so+0xa12ae9]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xd09
V  [libjvm.so+0xa13788]  CompileBroker::compiler_thread_loop()+0x518
V  [libjvm.so+0x1887f5c]  JavaThread::thread_main_inner()+0x27c
V  [libjvm.so+0x188e510]  Thread::call_run()+0x100
V  [libjvm.so+0x156de34]  thread_native_entry(Thread*)+0x104
Comments
Fix request [17u] I backport this for parity with 17.0.3-oracle. Low risk, trivial fix. Clean backport. Test passes. SAP nightly testing passes.
02-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/139 Date: 2022-02-01 10:36:39 +0000
01-02-2022

Changeset: 47564cae Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2021-11-19 07:07:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/47564caeb0628e5c03a0e7f04093adce77d6dd3b
19-11-2021

ILW = Fatal error during C2 compilation, with incubator feature/tests and experimental flags, disable affected intrinsic = HLM = P3
20-10-2021