[Mlir-commits] [mlir] [mlir][SPIR-V] Add ArithToSPIRV patterns for ceildivui/ceildivsi/floordivsi (PR #212926)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jul 30 02:37:08 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3997 tests passed
* 444 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Conversion/ArithToSPIRV/arith-to-spirv.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe -split-input-file -convert-arith-to-spirv -verify-diagnostics C:\_work\llvm-project\llvm-project\mlir\test\Conversion\ArithToSPIRV\arith-to-spirv.mlir | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Conversion\ArithToSPIRV\arith-to-spirv.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' -split-input-file -convert-arith-to-spirv -verify-diagnostics 'C:\_work\llvm-project\llvm-project\mlir\test\Conversion\ArithToSPIRV\arith-to-spirv.mlir'
# 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\mlir\test\Conversion\ArithToSPIRV\arith-to-spirv.mlir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\Conversion\ArithToSPIRV\arith-to-spirv.mlir:49:12: error: CHECK: expected string not found in input
# |  // CHECK: %[[ISZERO:.+]] = spirv.IEqual %[[LHS]], %{{.+}} : i32
# |            ^
# | <stdin>:26:37: note: scanning from here
# |  %3 = spirv.IAdd %2, %cst1_i32 : i32
# |                                     ^
# | <stdin>:26:37: note: with "LHS" equal to "arg0"
# |  %3 = spirv.IAdd %2, %cst1_i32 : i32
# |                                     ^
# | <stdin>:26:37: note: pattern attempts to capture variables: "ISZERO"
# |  %3 = spirv.IAdd %2, %cst1_i32 : i32
# |                                     ^
# | <stdin>:27:2: note: possible intended match here
# |  %4 = spirv.Select %0, %cst0_i32, %3 : i1, i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\Conversion\ArithToSPIRV\arith-to-spirv.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  %cst0_i32 = spirv.Constant 0 : i32 
# |            22:  %cst1_i32 = spirv.Constant 1 : i32 
# |            23:  %0 = spirv.IEqual %arg0, %cst0_i32 : i32 
# |            24:  %1 = spirv.ISub %arg0, %cst1_i32 : i32 
# |            25:  %2 = spirv.UDiv %1, %arg1 : i32 
# |            26:  %3 = spirv.IAdd %2, %cst1_i32 : i32 
# | check:49'0                                        {   search range start (exclusive)
# | check:49'1                                            error: no match found in search range
# | check:49'2                                            with "LHS" equal to "arg0"
# | check:49'3                                            pattern attempts to capture variables: "ISZERO"
# |            27:  %4 = spirv.Select %0, %cst0_i32, %3 : i1, i32 
# | check:49'4      ?                                               possible intended match
# |            28:  return %4 : i32 
# |            29:  } 
# |            30:  func.func @scalar_ceildivsi(%arg0: i32, %arg1: i32) -> i32 { 
# | check:49'5                                 }                                   search range end (exclusive)
# |            31:  %cst0_i32 = spirv.Constant 0 : i32 
# |            32:  %cst1_i32 = spirv.Constant 1 : i32 
# |            33:  %0 = spirv.SDiv %arg0, %arg1 : i32 
# |            34:  %1 = spirv.IMul %0, %arg1 : i32 
# |            35:  %2 = spirv.INotEqual %arg0, %1 : i32 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/212926


More information about the Mlir-commits mailing list