Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8365841

RISC-V: Several IR verification tests fail after JDK-8350960 without Zvfh

XMLWordPrintable

    • b12
    • riscv
    • linux

      The error in both cases is caused by the same reason: the target IR, MulReductionVI, is not matched.
      This is because the match_rule_supported_vector in riscv_v.ad is missing a break. If the if condition in `case MulReductionVI` evaluates to false, the loop will not exit until the `return UseZvfh`.

      Failed IR tests:
      compiler/loopopts/superword/ProdRed_Int.java
      compiler/loopopts/superword/RedTest_int.java

      Error log of ProdRed_Int.java:
      ```
      One or more @IR rules failed:

      Failed IR Rules (1) of Methods (1)
      ----------------------------------
      1) Method "public static int compiler.loopopts.superword.ProdRed_Int.prodReductionImplement(int[],int[],int)" - [Failed IR rules: 1]:
         * @IR rule 3: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#MUL_REDUCTION_VI#_", ">= 1", "_#MUL_REDUCTION_VI#_", "<= 2"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={"rvv", "true"}, applyIfAnd={"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, applyIfNot={})"
           > Phase "PrintIdeal":
             - counts: Graph contains wrong number of nodes:
               * Constraint 1: "(\\d+(\\s){2}(MulReductionVI.*)+(\\s){2}===.*)"
                 - Failed comparison: [found] 0 >= 1 [given]
                 - No nodes matched!

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

      One or more @IR rules failed:

      Failed IR Rules (1) of Methods (1)
      ----------------------------------
      1) Method "public static int compiler.loopopts.superword.ProdRed_Int.prodReductionImplement(int[],int[],int)" - [Failed IR rules: 1]:
         * @IR rule 3: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#MUL_REDUCTION_VI#_", ">= 1", "_#MUL_REDUCTION_VI#_", "<= 2"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={"rvv", "true"}, applyIfAnd={"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, applyIfNot={})"
           > Phase "PrintIdeal":
             - counts: Graph contains wrong number of nodes:
               * Constraint 1: "(\\d+(\\s){2}(MulReductionVI.*)+(\\s){2}===.*)"
                 - Failed comparison: [found] 0 >= 1 [given]
                 - No nodes matched!

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

            dzhang Dingli Zhang
            dzhang Dingli Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: