RFR: 8357551: RISC-V: support CMoveF/D vectorization [v2]
Emanuel Peter
epeter at openjdk.org
Mon Nov 17 09:55:06 UTC 2025
On Mon, 17 Nov 2025 09:40:29 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/c2/irTests/TestScalarConditionalMoveCmpObj.java line 131:
>>
>>> 129: // applyIf = {"UseCompressedOops", "false"})
>>> 130: // @IR(counts = {IRNode.CMOVE_L, ">0", IRNode.CMP_N, ">0"},
>>> 131: // applyIf = {"UseCompressedOops", "true"})
>>
>> Do you plan to still do this in this PR? Probably a future RFE would be better. It could be nice if you could link to the RFE with the issue number from this comment.
>
> In this PR, no, this one will only implement CMoveF/D and enable the vectorization of CMoveF/D, so do some preparation for https://github.com/openjdk/jdk/pull/28231.
> To guarantee the generation of CMoveI/L, seems to me we need to improve the cost model when transfrom a phi to a conditional move. I can have a invetigation later, as this impact how & whether CMoveL/I can be generated and be vectorized accordingly. File https://bugs.openjdk.org/browse/JDK-8371984 to track it.
Ok. Sounds good. Just note: getting the cost model right here can be really difficult. People have played with the cost model in recent years, and it has also led to regressions in some cases. Just FYI, I'm not stopping you from trying if you like ;)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28309#discussion_r2533420545
More information about the hotspot-dev
mailing list