JDK-8318683 : compiler/c2/irTests/TestPhiDuplicatedConversion.java "Failed IR Rules (2) of Methods (2)"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2023-10-23
  • Updated: 2025-04-09
  • Resolved: 2023-11-01
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 22
22 b22Fixed
Related Reports
Causes :  
Relates :  
Description
The following test failed in my jdk-22+20 stress testing run:

compiler/c2/irTests/TestPhiDuplicatedConversion.java

Here's a snippet from one of the slowdebug log files:

----------System.err:(53/5398)*----------

Command Line:
/work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/build/linux-x86_64-normal-server-slowdebug/images/jdk/bin/java -DReproduce=true -cp /work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/build/linux-x86_64-normal-server-slowdebug/test-support/jtreg_open_test_hotspot_jtreg_tier1/classes/0/compiler/c2/irTests/TestPhiDuplicatedConversion.d:/work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/open/test/hotspot/jtreg/compiler/c2/irTests:/work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/build/linux-x86_64-normal-server-slowdebug/test-support/jtreg_open_test_hotspot_jtreg_tier1/classes/0/test/lib:/work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/build/linux-x86_64-normal-server-slowdebug/test-support/jtreg_open_test_hotspot_jtreg_tier1/classes/0:/work/local/jib-dcubed/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/jtreg.jar:/work/local/jib-dcubed/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/junit-platform-console-standalone-1.9.2.jar:/work/local/jib-dcubed/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/testng-7.3.0.jar:/work/local/jib-dcubed/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/jcommander-1.82.jar:/work/local/jib-dcubed/install/jtreg/7.3.1/1/bundles/jtreg-7.3.1+1.zip/jtreg/lib/guice-5.1.0.jar -Djava.library.path=/work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/build/linux-x86_64-normal-server-slowdebug/images/test/hotspot/jtreg/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:MaxRAMPercentage=1.5625 -Dtest.boot.jdk=/work/local/jib-dcubed/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21 -Djava.io.tmpdir=/work/shared/bug_hunt/thread_SMR_stress/jdk22_exp.git/build/linux-x86_64-normal-server-slowdebug/test-support/jtreg_open_test_hotspot_jtreg_tier1/tmp -Dir.framework.server.port=45833 -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:CompilerDirectivesFile=test-vm-compile-commands-pid-3094480.log -XX:CompilerDirectivesLimit=141 -XX:-OmitStackTraceInFastThrow -DShouldDoIRVerification=true -XX:-BackgroundCompilation -XX:CompileCommand=quiet compiler.lib.ir_framework.test.TestVM compiler.c2.irTests.TestPhiDuplicatedConversion

One or more @IR rules failed:

Failed IR Rules (2) of Methods (2)
----------------------------------
1) Method "public static short compiler.c2.irTests.TestPhiDuplicatedConversion.float2HalfFloat(boolean,float,float)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={"avx", "true", "asimd", "true"}, counts={"_#CONV#_", "1"}, applyIfPlatform={}, applyIfPlatformOr={}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "PrintIdeal":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(Conv.*)+(\\s){2}===.*)"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

2) Method "public static float compiler.c2.irTests.TestPhiDuplicatedConversion.halfFloat2Float(boolean,short,short)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={"avx", "true", "asimd", "true"}, counts={"_#CONV#_", "1"}, applyIfPlatform={}, applyIfPlatformOr={}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "PrintIdeal":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(Conv.*)+(\\s){2}===.*)"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

My jdk-22+20 stress testing run had a total of 6 failures out of 9
executions of the test. The failed the same way in both fastdebug
and slowdebug configs and the test passed in the release config.
Comments
JDK-8335860 relies on the addition to the IR Framework in this change.
09-04-2025

Changeset: 2a76ad97 Author: Jasmine Karthikeyan <jkarthikeyan@openjdk.org> Committer: Tobias Hartmann <thartmann@openjdk.org> Date: 2023-11-01 06:12:55 +0000 URL: https://git.openjdk.org/jdk/commit/2a76ad975c8612c19f6c1c8f5a996017f753cb66
01-11-2023

Here's the logs from my jdk-22+21 stress run sightings on linux-x64: $ unzip -l jdk-22+21_linux-x64.8318683.zip Archive: jdk-22+21_linux-x64.8318683.zip Length Date Time Name --------- ---------- ----- ---- 76539 2023-10-27 09:34 jdk-22+21_1/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.fastdebug 76546 2023-10-27 04:15 jdk-22+21_1/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.slowdebug 76498 2023-10-28 11:59 jdk-22+21_2/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.fastdebug 76527 2023-10-28 06:19 jdk-22+21_2/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.slowdebug 76523 2023-10-29 12:59 jdk-22+21_3/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.fastdebug 76553 2023-10-29 07:15 jdk-22+21_3/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.slowdebug --------- ------- 459186 6 files
30-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16378 Date: 2023-10-26 12:29:44 +0000
26-10-2023

ILW = Test fails IR verification (test bug), single test on specific x86 machines, no workaround = MLH = P4
24-10-2023

[~jkarthikeyan] Right, other tests like compiler/intrinsics/float16/TestConstFloat16ToFloat.java check for vm.cpu.features ~= ".*avx512vl.*" | vm.cpu.features ~= ".*f16c.*"
24-10-2023

It seems like the test here is failing because the float16 intrinsics weren't able to be applied properly as they weren't available, but the IR test was still applied. I think the solution would be to make the test check for the 'f16c' or 'avx512vl' cpu features directly on x86, and not just for AVX as it did before.
24-10-2023

Here's the logs from my jdk-22+20 stress run sightings on linux-x64: $ unzip -l jdk-22+20_linux-x64.8318683.zip Archive: jdk-22+20_linux-x64.8318683.zip Length Date Time Name --------- ---------- ----- ---- 76633 2023-10-20 08:37 jdk-22+20_1/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.fastdebug 76593 2023-10-20 03:24 jdk-22+20_1/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.slowdebug 76557 2023-10-21 09:14 jdk-22+20_2/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.fastdebug 76634 2023-10-21 04:07 jdk-22+20_2/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.slowdebug 76632 2023-10-22 11:53 jdk-22+20_3/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.fastdebug 76634 2023-10-22 06:08 jdk-22+20_3/failures.linux-x86_64/TestPhiDuplicatedConversion.jtr.slowdebug --------- ------- 459683 6 files
23-10-2023