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

RISC-V: compiler/loopopts/superword/TestGeneralizedReductions.java fails with Zvbb and vlen=128

XMLWordPrintable

    • b11
    • riscv
    • linux

        JDK-8352529 enables this IR verification test for riscv. This test pass with zvbb when vlen=256, but fail when vlen=128.
        The reason for the error is the same as JDK-8357694. 2-element reductions for INT/LONG are not profitable, so the compiler won't generate the corresponding reductions IR.
        This issue was not addressed together with JDK-8357694 because the testMapReductionOnGlobalAccumulator use case where the error is reported has a different applyif method from other use cases: zvbb needs to be enabled.

        Error log:
        ```
        Failed IR Rules (1) of Methods (1)
        ----------------------------------
        1) Method "private static long compiler.loopopts.superword.TestGeneralizedReductions.testMapReductionOnGlobalAccumulator(long[])" - [Failed IR rules: 1]:
           * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={"zvbb", "true"}, counts={"_#ADD_REDUCTION_VI#_", ">= 1", "_#V#POPCOUNT_VL#_", ">= 1"}, applyIfPlatformOr={}, applyIfPlatform={"riscv64", "true"}, failOn={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={"SuperWordReductions", "true", "UsePopCountInstruction", "true"}, applyIfNot={})"
             > Phase "PrintIdeal":
               - counts: Graph contains wrong number of nodes:
                 * Constraint 1: "(\\d+(\\s){2}(AddReductionVI.*)+(\\s){2}===.*)"
                   - Failed comparison: [found] 0 >= 1 [given]
                   - No nodes matched!
                 * Constraint 2: "(\\d+(\\s){2}(PopCountVL.*)+(\\s){2}===.*vector[A-Za-z]<J,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: