RFR: 8327381 Refactor type-improving transformations in BoolNode::Ideal to BoolNode::Value [v5]
Kangcheng Xu
kxu at openjdk.org
Mon Mar 25 16:56:52 UTC 2024
> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
- update test @run annotation
- improve formatting, correct annotation and rename test class
- Merge branch 'master' into boolnode-refactor
- update the package name for tests
- modification per code review suggestions
- fix test by adding the missing inversion
also excluding negative values for unsigned comparison
- add license header
- also test for correctness
- exclude x86 from tests
- refactor (x & m) u<= m transformation and add test
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18198/files
- new: https://git.openjdk.org/jdk/pull/18198/files/e2eb8bf9..47d0172b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18198&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18198&range=03-04
Stats: 529499 lines in 6190 files changed: 68787 ins; 113225 del; 347487 mod
Patch: https://git.openjdk.org/jdk/pull/18198.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18198/head:pull/18198
PR: https://git.openjdk.org/jdk/pull/18198
More information about the hotspot-compiler-dev
mailing list