RFR: 8352635: Improve inferencing of Float16 operations with constant inputs [v8]

Jatin Bhateja jbhateja at openjdk.org
Fri Jun 20 11:21:30 UTC 2025


On Thu, 19 Jun 2025 06:19:49 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>>> @jatin-bhateja The patch now looks good to me, nice work! 😊 I'll run some internal testing.
>>> 
>>> However: I do not have hardware to thest Float16 on. So I'll rely on you to do thorough testing on relevant hardware, or alternatively SDE.
>> 
>> Hi @eme64 , Tests on Float16 targets are clean, let us know the results of internal testing.
>
> @jatin-bhateja 
> I see one test failing that looks related:
> `compiler/vectorization/TestFloat16VectorOperations.java`
> The run was done with lots of stress flags, probably not all are relevant, and it may be intermittent.
> `-XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+StressArrayCopyMacroNode -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:+StressMethodHandleLinkerInlining -XX:+StressCompiledExceptionHandlers -XX:VerifyConstraintCasts=1`
> 
> 
> #  Internal Error (.../src/hotspot/share/opto/type.hpp:2234), pid=2401514, tid=2401533
> #  assert(_base == FloatCon) failed: Not a Float
> 
> ...
> 
> Current CompileTask:
> C2:1885  336 %  b        compiler.vectorization.TestFloat16VectorOperations::vectorAddFloat16 @ 2 (46 bytes)
> 
> Stack: [0x00007ff300480000,0x00007ff300580000],  sp=0x00007ff30057aed0,  free space=1003k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V  [libjvm.so+0xc0358e]  ConvF2HFNode::Ideal(PhaseGVN*, bool)+0x88e  (type.hpp:2234)
> V  [libjvm.so+0x181809d]  PhaseIterGVN::transform_old(Node*)+0xbd  (phaseX.cpp:668)
> V  [libjvm.so+0x181c705]  PhaseIterGVN::optimize()+0xc5  (phaseX.cpp:1054)
> V  [libjvm.so+0xb498f2]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x722  (loopnode.hpp:1268)
> V  [libjvm.so+0xb43630]  Compile::Optimize()+0xb00  (compile.cpp:2468)
> V  [libjvm.so+0xb46943]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1f33  (compile.cpp:868)
> V  [libjvm.so+0x96bdd7]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x467  (c2compiler.cpp:141)
> V  [libjvm.so+0xb55d78]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58  (compileBroker.cpp:2323)
> V  [libjvm.so+0xb56f48]  CompileBroker::compiler_thread_loop()+0x578  (compileBroker.cpp:1967)
> V  [libjvm.so+0x10aa00b]  JavaThread::thread_main_inner()+0x13b  (javaThread.cpp:773)
> V  [libjvm.so+0x1b0e096]  Thread::call_run()+0xb6  (thread.cpp:243)
> V  [libjvm.so+0x17893f8]  thread_native_entry(Thread*)+0x128  (os_linux.cpp:868)

Hi @eme64 , let me know if this looks good to land now.

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

PR Comment: https://git.openjdk.org/jdk/pull/24179#issuecomment-2991065799


More information about the hotspot-compiler-dev mailing list