RFR: 8319960: RISC-V: compiler/intrinsics/TestInteger/LongUnsignedDivMod.java failed with "counts: Graph contains wrong number of nodes"

Hamlin Li mli at openjdk.org
Mon Nov 13 16:12:57 UTC 2023


On Mon, 13 Nov 2023 15:59:07 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi,
>> Can you review this patch to fix the test failure in compiler/intrinsics/TestInteger/LongUnsignedDivMod.java?
>> The reason of failure is that, `UDivModI` is only supplied on x86_64.ad, so it can not find this node on riscv.
>> Fix is to apply the check only on x64.
>> Thanks!
>> 
>> 
>> ## Test
>> To reproduce the issue, 
>> 
>> jtreg -timeout:10 -retain -v1 -conc:32 -nr -javaoptions:"" -testjdk:build/linux-riscv64-server-fastdebug/images/jdk/ ./test/hotspot/jtreg/compiler/intrinsics/TestIntegerUnsignedDivMod.java ./test/hotspot/jtreg/compiler/intrinsics/TestLongUnsignedDivMod.java
>
> These 2 tests also fail on aarch64 (after enble the tests on aarch64, which is addressed in https://github.com/openjdk/jdk/pull/16633)

> Thanks @Hamlin-Li !
> 
> I don't know what the correct solution is, I need to do some code digging first. I'll wait with that and see if other folks may know this by heart.

The tests are doing 2 separate things: a) verify the intrinsic implementation works well in functionality (i.e. UDivI/L, UModI/L); b) verify the ideal graph logs match the rules speficied in @IR in the tests.
What failed is the second part, as the matching rule is not right for riscv, because we don't have an intrinsic for UDivModI on riscv64.

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

PR Comment: https://git.openjdk.org/jdk/pull/16630#issuecomment-1808471462


More information about the hotspot-compiler-dev mailing list