JDK-8353182 : [lworld] C2: Multiple IR test failures in compiler/gcbarriers/TestZGCBarrierElision.java after JDK-8351569
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-03-28
  • Updated: 2025-03-28
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-valhallaUnresolved
Related Reports
Causes :  
Relates :  
Description
There are multiple IR test failures in tier1 (without flags) with

compiler/gcbarriers/TestZGCBarrierElision.java

after JDK-8351569 went in:

id=Z:

Failed IR Rules (6) of Methods (6)
----------------------------------
1) Method "static void compiler.gcbarriers.TestZGCCorrectBarrierElision.testAllocateArrayThenAtomicAtKnownIndex(compiler.gcbarriers.Outer)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

2) Method "static void compiler.gcbarriers.TestZGCCorrectBarrierElision.testAllocateArrayThenAtomicAtUnknownIndex(compiler.gcbarriers.Outer,int)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

3) Method "static void compiler.gcbarriers.TestZGCCorrectBarrierElision.testAllocateThenAtomic(compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

4) Method "static void compiler.gcbarriers.TestZGCCorrectBarrierElision.testArrayAtomicThenAtomicAtUnknownIndices(compiler.gcbarriers.Outer[],compiler.gcbarriers.Outer,int,int)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "2"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 2 [given]
           - No nodes matched!

5) Method "static void compiler.gcbarriers.TestZGCCorrectBarrierElision.testAtomicThenAtomicAnotherField(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "2"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 2 [given]
           - No nodes matched!

6) Method "static void compiler.gcbarriers.TestZGCCorrectBarrierElision.testLoadThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!


id=ZGen:

Failed IR Rules (7) of Methods (5)
----------------------------------
1) Method "static void compiler.gcbarriers.TestZGCEffectiveBarrierElision.testArrayAtomicThenAtomic(compiler.gcbarriers.Outer[],compiler.gcbarriers.Outer)" - [Failed IR rules: 2]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*elided\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

2) Method "static void compiler.gcbarriers.TestZGCEffectiveBarrierElision.testAtomicThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 2]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*elided\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

3) Method "static void compiler.gcbarriers.TestZGCEffectiveBarrierElision.testAtomicThenLoad(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

4) Method "static void compiler.gcbarriers.TestZGCEffectiveBarrierElision.testAtomicThenStore(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*strong\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

5) Method "static void compiler.gcbarriers.TestZGCEffectiveBarrierElision.testStoreThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={FINAL_CODE}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}((zXChgP)|(zGetAndSetP\\S*).*)+(\\s){2}===.*barrier\\(\\s*elided\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!
Comments
Failing tests should be enabled again that were disabled with https://github.com/openjdk/valhalla/pull/1413.
28-03-2025