[flang-commits] [flang] [flang][OpenACC] Fix reduction init value for minnumf/minimumf/maxnumf/maximumf (PR #187647)
via flang-commits
flang-commits at lists.llvm.org
Fri Mar 20 10:13:45 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 4067 tests passed
* 245 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Flang
<details>
<summary>Flang.Lower/OpenACC/acc-reduction.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 3
bbc -fopenacc -emit-hlfir C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90 -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90
# executed command: bbc -fopenacc -emit-hlfir 'C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90:43:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.401300e-45 : f32
# | ^
# | <stdin>:35:45: note: scanning from here
# | ^bb0(%arg0: !fir.box<!fir.array<?x?xf32>>):
# | ^
# | <stdin>:36:2: note: possible intended match here
# | %cst = arith.constant -3.40282347E+38 : f32
# | ^
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90:130:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.401300e-45 : f32
# | ^
# | <stdin>:119:63: note: scanning from here
# | ^bb0(%arg0: !fir.ref<!fir.box<!fir.ptr<!fir.array<?xf32>>>>):
# | ^
# | <stdin>:120:2: note: possible intended match here
# | %cst = arith.constant -3.40282347E+38 : f32
# | ^
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90:199:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.401300e-45 : f32
# | ^
# | <stdin>:185:64: note: scanning from here
# | ^bb0(%arg0: !fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>>):
# | ^
# | <stdin>:186:2: note: possible intended match here
# | %cst = arith.constant -3.40282347E+38 : f32
# | ^
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90:336:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.401300e-45 : f32
# | ^
# | <stdin>:317:43: note: scanning from here
# | ^bb0(%arg0: !fir.box<!fir.array<?xf32>>):
# | ^
# | <stdin>:318:2: note: possible intended match here
# | %cst = arith.constant -3.40282347E+38 : f32
# | ^
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90:829:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.401300e-45 : f32
# | ^
# | <stdin>:776:73: note: scanning from here
# | %0 = fir.alloca !fir.array<100xf32> {bindc_name = "acc.reduction.init"}
# | ^
# | <stdin>:777:2: note: possible intended match here
# | %cst = arith.constant -3.40282347E+38 : f32
# | ^
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90:864:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CONSTANT_0:.*]] = arith.constant -1.401300e-45 : f32
# | ^
# | <stdin>:809:57: note: scanning from here
# | %0 = fir.alloca f32 {bindc_name = "acc.reduction.init"}
# | ^
# | <stdin>:810:2: note: possible intended match here
# | %cst = arith.constant -3.40282347E+38 : f32
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenACC\acc-reduction.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 30: %1 = fir.box_addr %0 : (!fir.box<!fir.heap<!fir.logical<4>>>) -> !fir.heap<!fir.logical<4>>
# | 31: fir.freemem %1 : !fir.heap<!fir.logical<4>>
# | 32: acc.terminator
# | 33: }
# | 34: acc.reduction.recipe @reduction_max_box_UxUxf32 : !fir.box<!fir.array<?x?xf32>> reduction_operator <max> init {
# | 35: ^bb0(%arg0: !fir.box<!fir.array<?x?xf32>>):
# | check:43'0 X error: no match found
# | 36: %cst = arith.constant -3.40282347E+38 : f32
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:43'1 ? possible intended match
# | 37: %c0 = arith.constant 0 : index
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 38: %0:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?x?xf32>>, index) -> (index, index, index)
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 39: %c1 = arith.constant 1 : index
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 40: %1:3 = fir.box_dims %arg0, %c1 : (!fir.box<!fir.array<?x?xf32>>, index) -> (index, index, index)
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 41: %2 = fir.shape %0#1, %1#1 : (index, index) -> !fir.shape<2>
# | check:43'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 114: %1 = fir.convert %0 : (!fir.ref<!fir.array<?x?xf32>>) -> !fir.heap<!fir.array<?x?xf32>>
# | 115: fir.freemem %1 : !fir.heap<!fir.array<?x?xf32>>
# | 116: acc.terminator
# | 117: }
# | 118: acc.reduction.recipe @reduction_max_ref_box_ptr_Uxf32 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xf32>>>> reduction_operator <max> init {
# | 119: ^bb0(%arg0: !fir.ref<!fir.box<!fir.ptr<!fir.array<?xf32>>>>):
# | check:130'0 X error: no match found
# | 120: %cst = arith.constant -3.40282347E+38 : f32
# | check:130'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:130'1 ? possible intended match
# | 121: %0 = fir.load %arg0 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xf32>>>>
# | check:130'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 122: %c0 = arith.constant 0 : index
# | check:130'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 123: %1:3 = fir.box_dims %0, %c0 : (!fir.box<!fir.ptr<!fir.array<?xf32>>>, index) -> (index, index, index)
# | check:130'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 124: %2 = fir.shape %1#1 : (index) -> !fir.shape<1>
# | check:130'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 125: %3 = fir.shape %1#1 : (index) -> !fir.shape<1>
# | check:130'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 180: %2 = fir.convert %1 : (!fir.ptr<!fir.array<?xf32>>) -> !fir.heap<!fir.array<?xf32>>
# | 181: fir.freemem %2 : !fir.heap<!fir.array<?xf32>>
# | 182: acc.terminator
# | 183: }
# | 184: acc.reduction.recipe @reduction_max_ref_box_heap_Uxf32 : !fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>> reduction_operator <max> init {
# | 185: ^bb0(%arg0: !fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>>):
# | check:199'0 X error: no match found
# | 186: %cst = arith.constant -3.40282347E+38 : f32
# | check:199'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:199'1 ? possible intended match
# | 187: %0 = fir.load %arg0 : !fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>>
# | check:199'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 188: %c0 = arith.constant 0 : index
# | check:199'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 189: %1:3 = fir.box_dims %0, %c0 : (!fir.box<!fir.heap<!fir.array<?xf32>>>, index) -> (index, index, index)
# | check:199'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 190: %2 = fir.shape %1#1 : (index) -> !fir.shape<1>
# | check:199'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 191: %3 = fir.shape %1#1 : (index) -> !fir.shape<1>
# | check:199'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 312: hlfir.assign %13 to %10 : i32, !fir.ref<i32>
# | 313: }
# | 314: acc.yield %arg0 : !fir.box<!fir.array<?xi32>>
# | 315: }
# | 316: acc.reduction.recipe @reduction_max_box_Uxf32 : !fir.box<!fir.array<?xf32>> reduction_operator <max> init {
# | 317: ^bb0(%arg0: !fir.box<!fir.array<?xf32>>):
# | check:336'0 X error: no match found
# | 318: %cst = arith.constant -3.40282347E+38 : f32
# | check:336'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:336'1 ? possible intended match
# | 319: %c0 = arith.constant 0 : index
# | check:336'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 320: %0:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
# | check:336'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 321: %1 = fir.shape %0#1 : (index) -> !fir.shape<1>
# | check:336'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 322: %2 = fir.shape %0#1 : (index) -> !fir.shape<1>
# | check:336'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 323: %3 = fir.allocmem !fir.array<?xf32>, %0#1 {bindc_name = "acc.reduction.init", uniq_name = ""}
# | check:336'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 771: hlfir.assign %2 to %arg0 : i32, !fir.ref<i32>
# | 772: acc.yield %arg0 : !fir.ref<i32>
# | 773: }
# | 774: acc.reduction.recipe @reduction_max_ref_100xf32 : !fir.ref<!fir.array<100xf32>> reduction_operator <max> init {
# | 775: ^bb0(%arg0: !fir.ref<!fir.array<100xf32>>):
# | 776: %0 = fir.alloca !fir.array<100xf32> {bindc_name = "acc.reduction.init"}
# | check:829'0 X error: no match found
# | 777: %cst = arith.constant -3.40282347E+38 : f32
# | check:829'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:829'1 ? possible intended match
# | 778: %c100 = arith.constant 100 : index
# | check:829'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 779: %1 = fir.shape %c100 : (index) -> !fir.shape<1>
# | check:829'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 780: %2 = fir.shape %c100 : (index) -> !fir.shape<1>
# | check:829'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 781: %c100_0 = arith.constant 100 : index
# | check:829'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 782: %3 = fir.shape %c100_0 : (index) -> !fir.shape<1>
# | check:829'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 804: }
# | 805: acc.yield %arg0 : !fir.ref<!fir.array<100xf32>>
# | 806: }
# | 807: acc.reduction.recipe @reduction_max_ref_f32 : !fir.ref<f32> reduction_operator <max> init {
# | 808: ^bb0(%arg0: !fir.ref<f32>):
# | 809: %0 = fir.alloca f32 {bindc_name = "acc.reduction.init"}
# | check:864'0 X error: no match found
# | 810: %cst = arith.constant -3.40282347E+38 : f32
# | check:864'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:864'1 ? possible intended match
# | 811: hlfir.assign %cst to %0 temporary_lhs : f32, !fir.ref<f32>
# | check:864'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 812: acc.yield %0 : !fir.ref<f32>
# | check:864'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 813: } combiner {
# | check:864'0 ~~~~~~~~~~~~~
# | 814: ^bb0(%arg0: !fir.ref<f32>, %arg1: !fir.ref<f32>):
# | 815: %0 = fir.load %arg1 : !fir.ref<f32>
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/187647
More information about the flang-commits
mailing list