RFR: 8367028: compiler/c2/irTests/TestFloat16ScalarOperations.java failing intermittently because of constant folding
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Tue Dec 9 12:39:11 UTC 2025
On Fri, 5 Dec 2025 14:43:57 GMT, Emanuel Peter <epeter 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)`.
Marked as reviewed by rcastanedalo (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/28678#pullrequestreview-3557187661
More information about the hotspot-compiler-dev
mailing list