JDK-8280089 : compiler/c2/irTests/TestIRAbs.java fails on some arches
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-17
  • Updated: 2022-09-09
  • Resolved: 2022-01-18
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 19
19 b06Fixed
Related Reports
Relates :  
Description
$ CONF=linux-x86-server-fastdebug make run-test TEST=compiler/c2/irTests/TestIRAbs.java

Failed IR Rules (3)
------------------
- Method "public long compiler.c2.irTests.TestIRAbs.testLong1(long)":
  * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIf={}, applyIfAnd={}, failOn={"(\\d+(\\s){2}(SubL.*)+(\\s){2}===.*)"}, applyIfOr={}, counts={}, applyIfNot={})"
    - failOn: Graph contains forbidden nodes:
        Regex 1: (\d+(\s){2}(SubL.*)+(\s){2}===.*)
        Matched forbidden node:
          25  SubL  === _  24  11  [[ 39  50 ]]  !jvms: TestIRAbs::testLong1 @ bci:2 (line 171)
  * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIf={}, applyIfAnd={}, failOn={}, applyIfOr={}, counts={"(\\d+(\\s){2}(AbsL.*)+(\\s){2}===.*)", "1"}, applyIfNot={})"
    - counts: Graph contains wrong number of nodes:
        Regex 1: (\d+(\s){2}(AbsL.*)+(\s){2}===.*)
        Expected 1 but found 0 nodes.

- Method "public long compiler.c2.irTests.TestIRAbs.testLong0(long)":
  * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIf={}, applyIfAnd={}, failOn={}, applyIfOr={}, counts={"(\\d+(\\s){2}(AbsL.*)+(\\s){2}===.*)", "1"}, applyIfNot={})"
    - counts: Graph contains wrong number of nodes:
        Regex 1: (\d+(\s){2}(AbsL.*)+(\s){2}===.*)
        Expected 1 but found 0 nodes.

>>> Check stdout for compilation output of the failed methods

Comments
ILW = IR test fails on x86_32, single test, no workaround = MLH = P4
18-01-2022

Changeset: 645b38d5 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-01-18 12:13:44 +0000 URL: https://git.openjdk.java.net/jdk/commit/645b38d586b38252faa4663aca0453e3079fc30d
18-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7116 Date: 2022-01-17 18:43:00 +0000
17-01-2022

The trouble is that AbsL parts of the test are arch-specific, as only {x86_64,aarch64,ppc64,s390}.ad have the match rules for AbsL. x86_32.ad does not have it, so C2 never actually emits AbsL in x86_32 case. AbsI, AbsF, AbsD are also not supported by arm.ad. I wonder if IR Test Framework might be able to disable subtests based on arch... It is probably all around easier to make this test x86_64 specific. It tests shared C2 code, so testing one architecture is probably enough.
17-01-2022