RFR: 8327381 Refactor type-improving transformations in BoolNode::Ideal to BoolNode::Value [v6]

Emanuel Peter epeter at openjdk.org
Tue Mar 26 06:48:22 UTC 2024


On Mon, 25 Mar 2024 20:10:53 GMT, Kangcheng Xu <kxu at openjdk.org> wrote:

>> This PR resolves [JDK-8327381](https://bugs.openjdk.org/browse/JDK-8327381)
>> 
>> Currently the transformations for expressions with patterns `((x & m) u<= m)` or `((m & x) u<= m)` to `true` is in `BoolNode::Ideal` function with a new constant node of value `1` created. However, this is technically a type-improving (reduction in range) transformation that's better suited in `BoolNode::Value` function.
>> 
>> New unit test `test/hotspot/jtreg/compiler/c2/TestBoolNodeGvn.java` asserting on IR nodes and correctness of this transformation is added and passing.
>
> Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   also renames the class name in @run

test/hotspot/jtreg/compiler/c2/irTests/TestBoolNodeGVN.java line 53:

> 51:     @Test
> 52:     @Arguments(values = {Argument.DEFAULT, Argument.DEFAULT})
> 53:     @IR(failOn = IRNode.CMP_U, phase = CompilePhase.AFTER_PARSING, applyIfPlatform = {"x86", "false"})

Is the 32bit x86 the only platform that does not support it? An alternative would be to enable the IR rule on all platforms that we know support the unsigned compare.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18198#discussion_r1538665654


More information about the hotspot-compiler-dev mailing list