RFR: 8357554: Enable vectorization of Bool -> CMove with different type size (on riscv) [v5]
Hamlin Li
mli at openjdk.org
Wed Dec 10 21:03:30 UTC 2025
> Hi,
>
> Can you help to review this patch?
>
> This patch enables the vectorization of statement like `op_1 bop op_2 ? res_f_d_1 : res_f_d_2` in a loop, where op_x's size is different from res_f_d_x's.
>
> To assist with code review, this pr contains only the shared code change, is splitted from https://github.com/openjdk/jdk/pull/28230, which enable & implement the riscv part. The similar optimization could be extended to other platforms.
>
> ## Some background
>
> Previously, it's https://github.com/openjdk/jdk/pull/25336, which was blocked by unsigned comparison issue. The issue was recently resolved by https://github.com/openjdk/jdk/pull/27942, so I'm re-start working on this optimization.
>
> This pr only relaxes one of the constraints in https://github.com/openjdk/jdk/pull/25336, i.e. transform CMoveF/D to vector operations no matter what's the size of comparison's operator, but remove the optimization of transform CMoveI/L to vector operations which I think need more investigation.
>
> # Test
> ## Jtreg
>
> in progress...
>
> ## Performance
>
> check the performance data in https://github.com/openjdk/jdk/pull/25341 on riscv.
>
> Thanks
Hamlin Li 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 38 additional commits since the last revision:
- enable riscv
- tests
- review comment
- Merge branch 'master' into vectorize-CMove-Bool
- Merge branch 'openjdk:master' into master
- Merge branch 'openjdk:master' into master
- Merge branch 'master' into vectorize-CMove-Bool
- Merge branch 'openjdk:master' into master
- Merge branch 'openjdk:master' into master
- fix typo
- ... and 28 more: https://git.openjdk.org/jdk/compare/ff004e25...ecc84adc
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28231/files
- new: https://git.openjdk.org/jdk/pull/28231/files/8e84017f..ecc84adc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28231&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28231&range=03-04
Stats: 121854 lines in 1871 files changed: 79162 ins; 31077 del; 11615 mod
Patch: https://git.openjdk.org/jdk/pull/28231.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28231/head:pull/28231
PR: https://git.openjdk.org/jdk/pull/28231
More information about the hotspot-compiler-dev
mailing list