On Fri, 20 Nov 2026 11:30:16 GMT, Jatin Bhateja <[email protected]> wrote:
>> Hi All, >> >> Currently Float16Vector.rearrange operations are not intrinsified and are >> executed through the fallback implementation. >> rearrange is a pure lane-permutation (data movement) operation; it never >> interprets the 16-bit lane bits as an IEEE binary16 >> number. Since a Float16 lane maps to T_SHORT, it reuses the existing 16-bit >> vector permute backend directly. >> >> Patch adds Add intrinsification support encompassing the following tasks: >> - Inline expander extension: allow LT_FLOAT16 past the lane-type guard in >> inline_vector_rearrange all downstream logic already resolves to the T_SHORT >> permute path. >> - Add an IR verification test asserting VectorRearrange is generated for >> Float16Vector.rearrange with correctness versus the fallback. >> >> Following are the performance number of benchmarks included with the patch >> on an AVX512-FP16 target. >> >> >> Baseline:- >> Benchmark (vectorDim) Mode Cnt >> Score Error Units >> Float16VectorOperationsBenchmark.rearrangeBenchmark 1024 thrpt 2 >> 217.410 ops/ms >> Float16VectorOperationsBenchmark.rearrangeBenchmark 2057 thrpt 2 >> 93.602 ops/ms >> >> Withopt:- >> Benchmark (vectorDim) Mode Cnt >> Score Error Units >> Float16VectorOperationsBenchmark.rearrangeBenchmark 1024 thrpt 2 >> 21842.915 ops/ms >> Float16VectorOperationsBenchmark.rearrangeBenchmark 2057 thrpt 2 >> 4047.767 ops/ms >> >> >> Please review and share your feedback. >> >> Best Regards, >> Jatin >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Jatin Bhateja has updated the pull request incrementally with one additional > commit since the last revision: > > Including the patch from Bhawana Kilambi Not a review but testing failed: compiler/vectorapi/TestFloat16VectorRearrange.java -Xcomp -XX:-TieredCompilation -DIgnoreCompilerControls=true # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (//workspace/open/src/hotspot/share/ci/ciConstant.hpp:108), pid=101623, tid=101643 # assert(is_reference_type(basic_type())) failed: wrong type # # JRE version: Java(TM) SE Runtime Environment (28.0) (fastdebug build 28-internal-2026-11-23-0659574.tobias.hartmann.jdktesting) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 28-internal-2026-11-23-0659574.tobias.hartmann.jdktesting, compiled mode, sharing, tiered, compressed oops, compact obj headers, g1 gc, linux-amd64) # Problematic frame: Current CompileTask: C2:71606 10698 b 4 compiler.vectorapi.TestFloat16VectorRearrange::rearrange256Masked (109 bytes) Stack: [0x00007f2495f7c000,0x00007f249607c000], sp=0x00007f2496076620, free space=1001k Native frames: (J=compiled Java code, A=AOT compiled, P=AOT preloaded, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1e14203] check_vbox(TypeInstPtr const*) [clone .isra.0]+0x283 (ciConstant.hpp:108) V [libjvm.so+0x1e153e8] GraphKit::unbox_vector(Node*, TypeInstPtr const*, BasicType, int)+0x438 (vectorIntrinsics.cpp:175) V [libjvm.so+0x1e21eae] LibraryCallKit::inline_vector_rearrange()+0x78e (vectorIntrinsics.cpp:2106) V [libjvm.so+0x15f44a5] LibraryIntrinsic::generate(JVMState*)+0x235 (library_call.cpp:135) V [libjvm.so+0xab1b28] CallGenerator::do_late_inline_helper()+0xbe8 (callGenerator.cpp:833) V [libjvm.so+0xcbb0dc] Compile::inline_incrementally_one()+0x1ac (compile.cpp:2854) V [libjvm.so+0xcbc4b3] Compile::inline_incrementally(PhaseIterGVN&)+0x3a3 (compile.cpp:2989) V [libjvm.so+0xccebc6] Compile::Optimize()+0x496 (compile.cpp:3136) V [libjvm.so+0xcd2e18] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x23f8 (compile.cpp:909) V [libjvm.so+0xaa7991] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x5a1 (c2compiler.cpp:168) V [libjvm.so+0xce23a1] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xec1 (compileBroker.cpp:2222) V [libjvm.so+0xce3318] CompileBroker::compiler_thread_loop()+0x668 (compileBroker.cpp:1927) V [libjvm.so+0x12acddb] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:662) V [libjvm.so+0x1d5a786] Thread::call_run()+0xb6 (thread.cpp:243) V [libjvm.so+0x1938a48] thread_native_entry(Thread*)+0x118 (os_linux.cpp:932) ------------- PR Comment: https://git.openjdk.org/jdk/pull/33198#issuecomment-7096845972
