RFR: 8355293: [TEST] RISC-V: enable more ir tests [v2]

Fei Yang fyang at openjdk.org
Thu Apr 24 10:24:04 UTC 2025


On Thu, 24 Apr 2025 09:53:10 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/loopopts/superword/ProdRed_Double.java line 94:
>> 
>>> 92:     @IR(applyIfPlatform = {"riscv64", "true"},
>>> 93:         applyIf = {"SuperWordReductions", "true"},
>>> 94:         failOn = {IRNode.MUL_REDUCTION_VF})
>> 
>> I think we can just leave this two test files (`ProdRed_Float.java`/`ProdRed_Double.java`) untouched?
>> The IR check is only enabled for x86 sse2 target for now. It does not apply to other CPUs. So I don't see why RISC-V is special here.
>
> I added these `failOn` checks for several reasons:
> 1. It's more clear for user reading the code in the future why we have Mul Reduction for int/long but not for float/double.
> 2. catch any *wrong* attemp to implement these instructs in the future, unless we have an efficient way to implement the ordered computation. For this one, we could catch it manually by reviewing code, but it's always better to do it automatically.

Ah, I see. There is a `ProdRed_Int.java` test there in the same directory. Then should we check for `MUL_REDUCTION_VD` instead of `MUL_REDUCTION_VF`? We are operating on doubles here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24797#discussion_r2058049295


More information about the hotspot-compiler-dev mailing list