[Mlir-commits] [mlir] [mlir][arith] Canonicalize cmpi select to min/max (PR #201737)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jun 4 20:02:34 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 8154 tests passed
* 620 tests skipped
* 6 tests failed
## Failed Tests
(click on a test name to see its output)
### MLIR
<details>
<summary>MLIR.Dialect/SparseTensor/sparse_fill_zero.mlir</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir --linalg-generalize-named-ops --pre-sparsification-rewrite --sparse-reinterpret-map --sparsification --sparse-tensor-conversion --canonicalize --cse | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir --linalg-generalize-named-ops --pre-sparsification-rewrite --sparse-reinterpret-map --sparsification --sparse-tensor-conversion --canonicalize --cse
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir:68:11: error: CHECK: expected string not found in input
# | // CHECK: %[[VAL_57:.*]] = arith.cmpi ult, %[[VAL_56]], %[[VAL_55]] : index
# | ^
# | <stdin>:68:47: note: scanning from here
# | %22 = memref.load %9[%arg4] : memref<?xindex>
# | ^
# | <stdin>:68:47: note: with "VAL_56" equal to "22"
# | %22 = memref.load %9[%arg4] : memref<?xindex>
# | ^
# | <stdin>:68:47: note: with "VAL_55" equal to "21"
# | %22 = memref.load %9[%arg4] : memref<?xindex>
# | ^
# | <stdin>:70:2: note: possible intended match here
# | %24 = arith.cmpi eq, %21, %23 : index
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 63: %23 = arith.andi %21, %22 : i1
# | 64: scf.condition(%23) %arg3, %arg4, %arg5 : index, index, index
# | 65: } do {
# | 66: ^bb0(%arg3: index, %arg4: index, %arg5: index):
# | 67: %21 = memref.load %7[%arg3] : memref<?xindex>
# | 68: %22 = memref.load %9[%arg4] : memref<?xindex>
# | check:68'0 X error: no match found
# | check:68'1 with "VAL_56" equal to "22"
# | check:68'2 with "VAL_55" equal to "21"
# | 69: %23 = arith.minui %22, %21 : index
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 70: %24 = arith.cmpi eq, %21, %23 : index
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:68'3 ? possible intended match
# | 71: %25 = arith.cmpi eq, %22, %23 : index
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 72: %26 = arith.andi %24, %25 : i1
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 73: %27 = scf.if %26 -> (index) {
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 74: %32 = memref.load %2[%arg3] : memref<?xf64>
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 75: %33 = memref.load %10[%arg4] : memref<?xindex>
# | check:68'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>MLIR.Dialect/SparseTensor/sparse_kernels_to_iterator.mlir</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir --sparse-reinterpret-map -sparsification="sparse-emit-strategy=sparse-iterator" --cse | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir --check-prefix="ITER"
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir --sparse-reinterpret-map -sparsification=sparse-emit-strategy=sparse-iterator --cse
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir --check-prefix=ITER
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir --sparse-reinterpret-map -sparsification="sparse-emit-strategy=sparse-iterator" --cse --sparse-space-collapse --lower-sparse-iteration-to-scf --loop-invariant-code-motion -cse --canonicalize | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir --sparse-reinterpret-map -sparsification=sparse-emit-strategy=sparse-iterator --cse --sparse-space-collapse --lower-sparse-iteration-to-scf --loop-invariant-code-motion -cse --canonicalize
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir:107:11: error: CHECK: expected string not found in input
# | // CHECK: %[[VAL_25:.*]] = arith.cmpi ult, %[[VAL_24]], %[[VAL_23]] : index
# | ^
# | <stdin>:47:47: note: scanning from here
# | %14 = memref.load %6[%arg3] : memref<?xindex>
# | ^
# | <stdin>:47:47: note: with "VAL_24" equal to "14"
# | %14 = memref.load %6[%arg3] : memref<?xindex>
# | ^
# | <stdin>:47:47: note: with "VAL_23" equal to "13"
# | %14 = memref.load %6[%arg3] : memref<?xindex>
# | ^
# | <stdin>:49:2: note: possible intended match here
# | %16 = arith.cmpi eq, %13, %15 : index
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/SparseTensor/sparse_kernels_to_iterator.mlir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 42: %15 = arith.andi %13, %14 : i1
# | 43: scf.condition(%15) %arg2, %arg3 : index, index
# | 44: } do {
# | 45: ^bb0(%arg2: index, %arg3: index):
# | 46: %13 = memref.load %2[%arg2] : memref<?xindex>
# | 47: %14 = memref.load %6[%arg3] : memref<?xindex>
# | check:107'0 X error: no match found
# | check:107'1 with "VAL_24" equal to "14"
# | check:107'2 with "VAL_23" equal to "13"
# | 48: %15 = arith.minui %14, %13 : index
# | check:107'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 49: %16 = arith.cmpi eq, %13, %15 : index
# | check:107'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:107'3 ? possible intended match
# | 50: %17 = arith.cmpi eq, %14, %15 : index
# | check:107'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 51: %18 = arith.andi %16, %17 : i1
# | check:107'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 52: scf.if %18 {
# | check:107'0 ~~~~~~~~~~~~~~
# | 53: %23 = sparse_tensor.values %arg0 : tensor<10xi32, #sparse1> to memref<?xi32>
# | check:107'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 54: %24 = memref.load %23[%arg2] : memref<?xi32>
# | check:107'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### Flang
<details>
<summary>Flang.Fir/boxproc.fir</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
tco --target=aarch64-unknown-linux-gnu /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir --check-prefixes=CHECK,CHECK-AARCH64
# executed command: tco --target=aarch64-unknown-linux-gnu /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir --check-prefixes=CHECK,CHECK-AARCH64
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir:100:11: error: CHECK: expected string not found in input
# | // CHECK: %[[VAL_8:.*]] = icmp sgt i64 %[[VAL_6]], 10
# | ^
# | <stdin>:94:38: note: scanning from here
# | %7 = extractvalue { ptr, i64 } %5, 1
# | ^
# | <stdin>:94:38: note: with "VAL_6" equal to "7"
# | %7 = extractvalue { ptr, i64 } %5, 1
# | ^
# | <stdin>:103:2: note: possible intended match here
# | %13 = icmp sgt i64 %12, 0
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir:136:11: error: CHECK: expected string not found in input
# | // CHECK: %[[VAL_30:.*]] = icmp sgt i64 %[[VAL_13]], 40
# | ^
# | <stdin>:143:38: note: scanning from here
# | store [1 x i8] %21, ptr %22, align 1, !tbaa !33
# | ^
# | <stdin>:143:38: note: with "VAL_13" equal to "12"
# | store [1 x i8] %21, ptr %22, align 1, !tbaa !33
# | ^
# | <stdin>:157:2: note: possible intended match here
# | %31 = icmp sgt i64 %30, 0
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Fir/boxproc.fir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 89:
# | 90: define { ptr, i64 } @_QFtest_proc_dummy_charPgen_message(ptr noalias captures(none) %0, i64 %1, ptr nest noalias captures(none) %2) {
# | 91: %4 = getelementptr { { ptr, i64 } }, ptr %2, i32 0, i32 0
# | 92: %5 = load { ptr, i64 }, ptr %4, align 8, !tbaa !28
# | 93: %6 = extractvalue { ptr, i64 } %5, 0
# | 94: %7 = extractvalue { ptr, i64 } %5, 1
# | check:100'0 X error: no match found
# | check:100'1 with "VAL_6" equal to "7"
# | 95: %8 = call i64 @llvm.smin.i64(i64 %7, i64 10)
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 96: call void @llvm.memmove.p0.p0.i64(ptr %0, ptr %6, i64 %8, i1 false)
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 97: %9 = sub i64 10, %8
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~
# | 98: br label %10
# | check:100'0 ~~~~~~~~~~~~~~
# | 99:
# | check:100'0 ~
# | 100: 10: ; preds = %14, %3
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 101: %11 = phi i64 [ %16, %14 ], [ %8, %3 ]
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 102: %12 = phi i64 [ %17, %14 ], [ %9, %3 ]
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 103: %13 = icmp sgt i64 %12, 0
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:100'2 ? possible intended match
# | 104: br i1 %13, label %14, label %18
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 105:
# | check:100'0 ~
# | 106: 14: ; preds = %10
# | check:100'0 ~~~~~~~~~~~~~~~~~~
# | 107: %15 = getelementptr [1 x i8], ptr %0, i64 %11
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 108: store [1 x i8] c" ", ptr %15, align 1, !tbaa !28
# | check:100'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 138: 18: ; preds = %14
# | 139: %19 = sub i64 %15, 12
# | 140: %20 = getelementptr [1 x i8], ptr %10, i64 %19
# | 141: %21 = load [1 x i8], ptr %20, align 1, !tbaa !33
# | 142: %22 = getelementptr [1 x i8], ptr %13, i64 %15
# | 143: store [1 x i8] %21, ptr %22, align 1, !tbaa !33
# | check:136'0 X~~~~~~~~~~~ error: no match found
# | check:136'1 with "VAL_13" equal to "12"
# | 144: %23 = add i64 %15, 1
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 145: %24 = sub i64 %16, 1
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 146: br label %14
# | check:136'0 ~~~~~~~~~~~~~~
# | 147:
# | check:136'0 ~
# | 148: 25: ; preds = %14
# | check:136'0 ~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 152: br label %28
# | check:136'0 ~~~~~~~~~~~~~~
# | 153:
# | check:136'0 ~
# | 154: 28: ; preds = %32, %25
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 155: %29 = phi i64 [ %34, %32 ], [ %26, %25 ]
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 156: %30 = phi i64 [ %35, %32 ], [ %27, %25 ]
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 157: %31 = icmp sgt i64 %30, 0
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:136'2 ? possible intended match
# | 158: br i1 %31, label %32, label %36
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 159:
# | check:136'0 ~
# | 160: 32: ; preds = %28
# | check:136'0 ~~~~~~~~~~~~~~~~~~
# | 161: %33 = getelementptr [1 x i8], ptr %0, i64 %29
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 162: store [1 x i8] c" ", ptr %33, align 1, !tbaa !38
# | check:136'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Flang.Lower/HLFIR/elemental-result-length.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/finclude/flang/x86_64-unknown-linux-gnu -emit-hlfir -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90 | fir-opt --canonicalize | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/finclude/flang/x86_64-unknown-linux-gnu -emit-hlfir -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90
# note: command had no output on stdout or stderr
# executed command: fir-opt --canonicalize
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90:34:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[LEN_LEN_IDX]], %c0{{.*}} : index
# | ^
# | <stdin>:38:40: note: scanning from here
# | %14 = fir.convert %13 : (i64) -> index
# | ^
# | <stdin>:38:40: note: with "LEN_LEN_IDX" equal to "14"
# | %14 = fir.convert %13 : (i64) -> index
# | ^
# | <stdin>:39:2: note: possible intended match here
# | %15 = arith.maxsi %14, %c0 : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90:57:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[LEN_LEN_IDX]], %c0{{.*}} : index
# | ^
# | <stdin>:69:40: note: scanning from here
# | %15 = fir.convert %14 : (i64) -> index
# | ^
# | <stdin>:69:40: note: with "LEN_LEN_IDX" equal to "15"
# | %15 = fir.convert %14 : (i64) -> index
# | ^
# | <stdin>:70:2: note: possible intended match here
# | %16 = arith.maxsi %15, %c0 : index
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/HLFIR/elemental-result-length.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 33: %9:2 = fir.unboxchar %4#0 : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
# | 34: %10:2 = hlfir.declare %9#0 typeparams %9#1 {fortran_attrs = #fir.var_attrs<intent_in>, uniq_name = "_QMm1Ffct1Eb"} : (!fir.ref<!fir.char<1,?>>, index) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
# | 35: %11 = fir.convert %7#1 : (index) -> i64
# | 36: %12 = fir.convert %9#1 : (index) -> i64
# | 37: %13 = arith.addi %11, %12 : i64
# | 38: %14 = fir.convert %13 : (i64) -> index
# | check:34'0 X error: no match found
# | check:34'1 with "LEN_LEN_IDX" equal to "14"
# | 39: %15 = arith.maxsi %14, %c0 : index
# | check:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:34'2 ? possible intended match
# | 40: %16 = llvm.intr.stacksave : !llvm.ptr
# | check:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 41: %17 = fir.alloca !fir.char<1,?>(%15 : index) {bindc_name = ".result"}
# | check:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 42: %18:2 = hlfir.declare %17 typeparams %15 {uniq_name = ".tmp.func_result"} : (!fir.ref<!fir.char<1,?>>, index) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
# | check:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 43: %19 = fir.call @_QMm1Pfct1(%17, %15, %2#0, %4#0) proc_attrs<elemental, pure> fastmath<contract> : (!fir.ref<!fir.char<1,?>>, index, !fir.boxchar<1>, !fir.boxchar<1>) -> !fir.boxchar<1>
# | check:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 44: %20 = hlfir.as_expr %18#0 move %false : (!fir.boxchar<1>, i1) -> !hlfir.expr<!fir.char<1,?>>
# | check:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 64: %10:2 = hlfir.declare %6 typeparams %7 {fortran_attrs = #fir.var_attrs<intent_in>, uniq_name = "_QMm1Ffct1Ea"} : (!fir.ref<!fir.char<1,?>>, index) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
# | 65: %11:2 = hlfir.declare %8 typeparams %9 {fortran_attrs = #fir.var_attrs<intent_in>, uniq_name = "_QMm1Ffct1Eb"} : (!fir.ref<!fir.char<1,?>>, index) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
# | 66: %12 = fir.convert %7 : (index) -> i64
# | 67: %13 = fir.convert %9 : (index) -> i64
# | 68: %14 = arith.addi %12, %13 : i64
# | 69: %15 = fir.convert %14 : (i64) -> index
# | check:57'0 X error: no match found
# | check:57'1 with "LEN_LEN_IDX" equal to "15"
# | 70: %16 = arith.maxsi %15, %c0 : index
# | check:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:57'2 ? possible intended match
# | 71: %17 = hlfir.elemental %5 typeparams %16 unordered : (!fir.shape<1>, index) -> !hlfir.expr<?x!fir.char<1,?>> {
# | check:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 72: ^bb0(%arg3: index):
# | check:57'0 ~~~~~~~~~~~~~~~~~~~~~
# | 73: %18 = fir.box_elesize %1#1 : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> index
# | check:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 74: %19 = hlfir.designate %1#0 (%arg3) typeparams %18 : (!fir.box<!fir.array<?x!fir.char<1,?>>>, index, index) -> !fir.boxchar<1>
# | check:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 75: %20 = fir.box_elesize %2#1 : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> index
# | check:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Flang.Lower/Intrinsics/show_descriptor.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/finclude/flang/x86_64-unknown-linux-gnu -emit-fir /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90 -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/finclude/flang/x86_64-unknown-linux-gnu -emit-fir /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90 -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90:28:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[CMPI_0:.*]] = arith.cmpi sgt, %[[CONVERT_0]], %[[C0]] : index
# | ^
# | <stdin>:20:39: note: scanning from here
# | %10 = fir.convert %9 : (i32) -> index
# | ^
# | <stdin>:20:39: note: with "CONVERT_0" equal to "10"
# | %10 = fir.convert %9 : (i32) -> index
# | ^
# | <stdin>:20:39: note: with "C0" equal to "c0"
# | %10 = fir.convert %9 : (i32) -> index
# | ^
# | <stdin>:21:2: note: possible intended match here
# | %11 = arith.maxsi %10, %c0 : index
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 15: %6 = fir.declare %2 {fortran_attrs = #fir.var_attrs<allocatable>, uniq_name = "_QMtest_show_descriptorFtest_intEa"} : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>) -> !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
# | 16: %7 = fir.alloca i32 {bindc_name = "n", uniq_name = "_QMtest_show_descriptorFtest_intEn"}
# | 17: %8 = fir.declare %7 {uniq_name = "_QMtest_show_descriptorFtest_intEn"} : (!fir.ref<i32>) -> !fir.ref<i32>
# | 18: fir.store %c5_i32 to %8 : !fir.ref<i32>
# | 19: %9 = fir.load %8 : !fir.ref<i32>
# | 20: %10 = fir.convert %9 : (i32) -> index
# | check:28'0 X error: no match found
# | check:28'1 with "CONVERT_0" equal to "10"
# | check:28'2 with "C0" equal to "c0"
# | 21: %11 = arith.maxsi %10, %c0 : index
# | check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:28'3 ? possible intended match
# | 22: %12 = fir.allocmem !fir.array<?xi32>, %11 {fir.must_be_heap = true, uniq_name = "_QMtest_show_descriptorFtest_intEa.alloc"}
# | check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: %13 = fir.shape %11 : (index) -> !fir.shape<1>
# | check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: %14 = fir.embox %12(%13) : (!fir.heap<!fir.array<?xi32>>, !fir.shape<1>) -> !fir.box<!fir.heap<!fir.array<?xi32>>>
# | check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 25: fir.store %14 to %6 : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
# | check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 26: %15 = fir.convert %6 : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>) -> !fir.ref<!fir.box<none>>
# | check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Flang.Lower/volatile1.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/finclude/flang/x86_64-unknown-linux-gnu --strict-fir-volatile-verifier /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/volatile1.f90 -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/volatile1.f90
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/finclude/flang/x86_64-unknown-linux-gnu --strict-fir-volatile-verifier /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/volatile1.f90 -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/volatile1.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/volatile1.f90:86:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[VAL_3]] : index
# | ^
# | <stdin>:61:38: note: scanning from here
# | %3 = fir.convert %2 : (i32) -> index
# | ^
# | <stdin>:61:38: note: with "VAL_7" equal to "3"
# | %3 = fir.convert %2 : (i32) -> index
# | ^
# | <stdin>:61:38: note: with "VAL_3" equal to "c0"
# | %3 = fir.convert %2 : (i32) -> index
# | ^
# | <stdin>:62:2: note: possible intended match here
# | %4 = arith.maxsi %3, %c0 : index
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/volatile1.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 56: %c1_i32 = arith.constant 1 : i32
# | 57: %c0 = arith.constant 0 : index
# | 58: %0 = fir.dummy_scope : !fir.dscope
# | 59: %1:2 = hlfir.declare %arg1 dummy_scope %0 arg 2 {fortran_attrs = #fir.var_attrs<intent_in>, uniq_name = "_QFFdeclared_volatile_in_this_scopeEn"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
# | 60: %2 = fir.load %1#0 : !fir.ref<i32>
# | 61: %3 = fir.convert %2 : (i32) -> index
# | check:86'0 X error: no match found
# | check:86'1 with "VAL_7" equal to "3"
# | check:86'2 with "VAL_3" equal to "c0"
# | 62: %4 = arith.maxsi %3, %c0 : index
# | check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:86'3 ? possible intended match
# | 63: %5 = fir.shape %4 : (index) -> !fir.shape<1>
# | check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: %6 = fir.volatile_cast %arg0 : (!fir.ref<!fir.array<?xi32>>) -> !fir.ref<!fir.array<?xi32>, volatile>
# | check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 65: %7:2 = hlfir.declare %6(%5) dummy_scope %0 arg 1 {fortran_attrs = #fir.var_attrs<intent_inout, volatile>, uniq_name = "_QFFdeclared_volatile_in_this_scopeEv"} : (!fir.ref<!fir.array<?xi32>, volatile>, !fir.shape<1>, !fir.dscope) -> (!fir.box<!fir.array<?xi32>, volatile>, !fir.ref<!fir.array<?xi32>, volatile>)
# | check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 66: hlfir.assign %c1_i32 to %7#0 : i32, !fir.box<!fir.array<?xi32>, volatile>
# | check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 67: return
# | check:86'0 ~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# 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/201737
More information about the Mlir-commits
mailing list