JDK-8329355 : Test compiler/c2/irTests/TestIfMinMax.java fails on RISC-V
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: linux
  • CPU: riscv
  • Submitted: 2024-03-30
  • Updated: 2024-03-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23Unresolved
Related Reports
Relates :  
Description
JDK-8324655 tries to identify min/max patterns in CMoves and transform them into Min and Max nodes.
But architectures like RISC-V doesn't have support of conditional moves at the ISA level for now.
So we set ConditionalMoveLimit parameter to 0 for this platform and conditionals moves are emulated
with normal compare and branch instructions instead [1]. This is why the IR matching test added by
JDK-8324655 fails on this platform. A simple way to fix this would be skip this test for this case.

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/riscv.ad#L9775
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18558 Date: 2024-03-30 08:49:00 +0000
30-03-2024