RFR: 8367028: compiler/c2/irTests/TestFloat16ScalarOperations.java failing intermittently because of constant folding
Emanuel Peter
epeter at openjdk.org
Tue Dec 9 12:48:12 UTC 2025
On Tue, 9 Dec 2025 07:49:45 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> The test uses random constants. But we forgot to exclude special values such as `zero`, otherwise the operations can be folded (idealized) and the IR tests fail. For example `x + 0.42` would not be folded, but `x + 0` would be folded to `x`.
>>
>> Solution: restrict the range we sample from. Used to be `[0, 1)`, now I just do `[0.1, 0.9)`.
>
> Looks good, thanks!
Thanks @chhagedorn @robcasloz @sendaoYan thanks for the reviews!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28678#issuecomment-3632078974
More information about the hotspot-compiler-dev
mailing list