- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    25
- 
        b12
- 
        riscv
- 
        linux
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8366123 | 25.0.2 | Dingli Zhang | P4 | Resolved | Fixed | b01 | 
                    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
```
            
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
```
- backported by
- 
                    JDK-8366123 RISC-V: Several IR verification tests fail after JDK-8350960 without Zvfh -           
- Resolved
 
-         
- relates to
- 
                    JDK-8350960 RISC-V: Add riscv backend for Float16 operations - vectorization -           
- Resolved
 
-         
- links to
- 
                     Commit(master)
        openjdk/jdk25u/36d05a37 Commit(master)
        openjdk/jdk25u/36d05a37
- 
                     Commit(master)
        openjdk/jdk/2e06a917 Commit(master)
        openjdk/jdk/2e06a917
- 
                     Review(master)
        openjdk/jdk25u/122 Review(master)
        openjdk/jdk25u/122
- 
                     Review(master)
        openjdk/jdk/26854 Review(master)
        openjdk/jdk/26854
             (1 links to)