JDK-8343420 : [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-11-01
  • Updated: 2025-05-22
  • Resolved: 2025-05-22
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.
Other
repo-valhallaFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18

1) Method "public static void compiler.gcbarriers.TestG1BarrierGeneration.testArrayStore(java.lang.Object[],int,java.lang.Object)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG#_", "pre post", "1"}, applyIfPlatform={}, applyIfPlatformOr={}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"UseCompressedOops", "true"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(g1EncodePAndStoreN\\S*.*)+(\\s){2}===.*barrier\\(\\s*pre post\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

2) Method "public static void compiler.gcbarriers.TestG1BarrierGeneration.testArrayStoreTwice(java.lang.Object[],java.lang.Object[],int,java.lang.Object)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG#_", "pre post", "2"}, applyIfPlatform={}, applyIfPlatformOr={}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"UseCompressedOops", "true"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(g1EncodePAndStoreN\\S*.*)+(\\s){2}===.*barrier\\(\\s*pre post\\s*\\))"
           - Failed comparison: [found] 0 = 2 [given]
           - No nodes matched!

3) Method "static java.lang.Object compiler.gcbarriers.TestG1BarrierGeneration.testCompareAndExchange(compiler.gcbarriers.TestG1BarrierGeneration$Outer,java.lang.Object,java.lang.Object)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG#_", "pre post", "1"}, applyIfPlatform={}, applyIfPlatformOr={}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"UseCompressedOops", "true"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(g1CompareAndExchangeN\\S*.*)+(\\s){2}===.*barrier\\(\\s*pre post\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

4) Method "static boolean compiler.gcbarriers.TestG1BarrierGeneration.testCompareAndSwap(compiler.gcbarriers.TestG1BarrierGeneration$Outer,java.lang.Object,java.lang.Object)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG#_", "pre post", "1"}, applyIfPlatform={}, applyIfPlatformOr={}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"UseCompressedOops", "true"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(g1CompareAndSwapN\\S*.*)+(\\s){2}===.*barrier\\(\\s*pre post\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!



Comments
A pull request was submitted for review. Branch: lworld URL: https://git.openjdk.org/valhalla/pull/1462 Date: 2025-05-19 11:00:19 +0000
19-05-2025

The failure in compiler.gcbarriers.TestG1BarrierGeneration.testGetAndSet (and possibly others too) seems to have been introduced by JDK-8351569 which introduced a new jdk.internal.misc.Unsafe::getAndSetReference method which is not intrinsified and the test seems to expect it.
06-05-2025

compiler/gcbarriers/TestG1BarrierGeneration.java failing tests have changed in the meantime: One or more @IR rules failed: Failed IR Rules (5) of Methods (5) ---------------------------------- 1) Method "static java.lang.Object compiler.gcbarriers.TestG1BarrierGeneration.testGetAndSet(compiler.gcbarriers.TestG1BarrierGeneration$Outer,java.lang.Object)" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "pre post", "1"}, failOn={}, applyIfPlatformOr={}, applyIfPlatform={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"UseCompressedOops", "false"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})" > Phase "Final Code": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(g1GetAndSetP\\S*.*)+(\\s){2}===.*barrier\\(\\s*pre post\\s*\\))" - Failed comparison: [found] 0 = 1 [given] - No nodes matched! 2) Method "static java.lang.Object compiler.gcbarriers.TestG1BarrierGeneration.testGetAndSetConditionallyOnNewObject(java.lang.Object,java.lang.Object,boolean)" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "post", "1"}, failOn={}, applyIfPlatformOr={}, applyIfPlatform={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={"UseCompressedOops", "false", "ReduceInitialCardMarks", "false"}, applyIfNot={})" > Phase "Final Code": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(g1GetAndSetP\\S*.*)+(\\s){2}===.*barrier\\(\\s*post\\s*\\))" - Failed comparison: [found] 0 = 1 [given] - No nodes matched! 3) Method "static java.lang.Object compiler.gcbarriers.TestG1BarrierGeneration.testGetAndSetOnNewObject(java.lang.Object,java.lang.Object)" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "post", "1"}, failOn={}, applyIfPlatformOr={}, applyIfPlatform={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={"UseCompressedOops", "false", "ReduceInitialCardMarks", "false"}, applyIfNot={})" > Phase "Final Code": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(g1GetAndSetP\\S*.*)+(\\s){2}===.*barrier\\(\\s*post\\s*\\))" - Failed comparison: [found] 0 = 1 [given] - No nodes matched! 4) Method "static java.lang.Object compiler.gcbarriers.TestG1BarrierGeneration.testGetAndSetOnNewObjectAfterCall(java.lang.Object,java.lang.Object)" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "pre post", "1"}, failOn={}, applyIfPlatformOr={}, applyIfPlatform={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"UseCompressedOops", "false"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})" > Phase "Final Code": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(g1GetAndSetP\\S*.*)+(\\s){2}===.*barrier\\(\\s*pre post\\s*\\))" - Failed comparison: [found] 0 = 1 [given] - No nodes matched! 5) Method "static java.lang.Object compiler.gcbarriers.TestG1BarrierGeneration.testGetAndSetOnNewObjectAfterException(java.lang.Object,java.lang.Object,boolean) throws java.lang.Exception" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#G1_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "post", "1"}, failOn={}, applyIfPlatformOr={}, applyIfPlatform={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={"UseCompressedOops", "false", "ReduceInitialCardMarks", "false"}, applyIfNot={})" > Phase "Final Code": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(g1GetAndSetP\\S*.*)+(\\s){2}===.*barrier\\(\\s*post\\s*\\))" - Failed comparison: [found] 0 = 1 [given] - No nodes matched!
06-05-2025