Integrated: 8367028: compiler/c2/irTests/TestFloat16ScalarOperations.java failing intermittently because of constant folding
Emanuel Peter
epeter at openjdk.org
Tue Dec 9 12:48:14 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)`.
This pull request has now been integrated.
Changeset: a4eb57c5
Author: Emanuel Peter <epeter at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a4eb57c5ec6254e59e486042015dd00457284ef2
Stats: 17 lines in 1 file changed: 9 ins; 0 del; 8 mod
8367028: compiler/c2/irTests/TestFloat16ScalarOperations.java failing intermittently because of constant folding
Reviewed-by: chagedorn, syan, rcastanedalo
-------------
PR: https://git.openjdk.org/jdk/pull/28678
More information about the hotspot-compiler-dev
mailing list