RFR: 8370922: Template Framework Library: Float16 type and operations [v3]
Emanuel Peter
epeter at openjdk.org
Mon Dec 15 07:04:37 UTC 2025
On Mon, 15 Dec 2025 06:47:22 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/igvn/ExpressionFuzzer.java line 343:
>>
>>> 341: // Generate expressions with any scalar numeric types.
>>> 342: for (CodeGenerationDataNameType type : SCALAR_NUMERIC_TYPES) {
>>> 343: for (int i = 0; i < 2; i++) {
>>
>> What does this loop do? And why do we have only 2 iterations here, but 10 for `PRIMITIVE_TYPES`?
>
> It `Generate[s] expressions with any scalar numeric types.` ;)
> The question is just how many per (output) type. Here we do 2 for each type.
>
> The 2 vs 10 is quite arbitrary. I did not want to increase the runtime of the test too much. For now, focusing more on the primitive types an operations is probably good, Float16 is still rather niche. But we can change the balance in the future.
Ah yes, and note: even if we start with a type other than Float16 as the output, we can still have Float16 components in the expression, via conversion for example. We can do `float -> Float16 -> float` for example.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28095#discussion_r2618206317
More information about the hotspot-compiler-dev
mailing list