Relax store matchers in compiler/escapeAnalysis/TestRematerializeObjects.java test

XMLWordPrintable

      JDK-8370405 added compiler/escapeAnalysis/TestRematerializeObjects.java test, which unfortunately somehow relies on mainline code shape for matching some stores. This test fails when applied to JDK 25u as part of JDK-8370405 backport:

      Failed IR Rules (2) of Methods (2)
      ----------------------------------
      1) Method "static int compiler.escapeAnalysis.TestRematerializeObjects.test1(boolean)" - [Failed IR rules: 1]:
         * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#ALLOC_ARRAY#_", "1", "_#UNSTABLE_IF_TRAP#_", "1", "_#C#STORE_L_OF_CLASS#_", "int\\[int:4\\]", "1", "_#C#SAFEPOINT_SCALAROBJECT_OF#_", "fields@\\[0..3\\]", "0"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"EliminateAllocations", "false"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
           > Phase "PrintIdeal":
             - counts: Graph contains wrong number of nodes:
               * Constraint 3: "(\d+(\s){2}(StoreL.*)+(\s){2}===.*@\S*int\[int:4\](:|\+)\S* \*)"
                 - Failed comparison: [found] 0 = 1 [given]
                 - No nodes matched!

      2) Method "static int compiler.escapeAnalysis.TestRematerializeObjects.test2(boolean)" - [Failed IR rules: 1]:
         * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#ALLOC_ARRAY#_", "1", "_#UNSTABLE_IF_TRAP#_", "1", "_#C#STORE_I_OF_CLASS#_", "short\\[int:4\\]", "1", "_#C#SAFEPOINT_SCALAROBJECT_OF#_", "fields@\\[0..3\\]", "0"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"EliminateAllocations", "false"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
           > Phase "PrintIdeal":
             - counts: Graph contains wrong number of nodes:
               * Constraint 3: "(\d+(\s){2}(StoreI.*)+(\s){2}===.*@\S*short\[int:4\](:|\+)\S* \*)"
                 - Failed comparison: [found] 0 = 1 [given]
                 - No nodes matched!

      Looks like these IR tests want e.g. IRNode.STORE_L_OF_CLASS, "int\\[int:4\\]", "1",

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: