[llvm] [SPIRV] Add missing OpenCL atomic_fetch_min/max builtin mappings (PR #190443)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 22:09:56 PDT 2026


github-actions[bot] wrote:

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

* 133056 tests passed
* 3061 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/SPIRV/transcoding/OpenCL/atomic_fetch_min_max.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -O0 -mtriple=spirv32-unknown-unknown C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\SPIRV\transcoding\OpenCL\atomic_fetch_min_max.ll -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\SPIRV\transcoding\OpenCL\atomic_fetch_min_max.ll --check-prefix=CHECK-SPIRV
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -O0 -mtriple=spirv32-unknown-unknown 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\SPIRV\transcoding\OpenCL\atomic_fetch_min_max.ll' -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\llvm\test\CodeGen\SPIRV\transcoding\OpenCL\atomic_fetch_min_max.ll' --check-prefix=CHECK-SPIRV
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\SPIRV\transcoding\OpenCL\atomic_fetch_min_max.ll:45:16: error: CHECK-SPIRV: expected string not found in input
# | ; CHECK-SPIRV: %[[#]] = OpAtomicSMin %[[#UINT]] %[[#SPTR]] %[[#WORKGROUP_SCOPE]] %[[#RELAXED]] %[[#SVAL]]
# |                ^
# | <stdin>:34:38: note: scanning from here
# |  %19 = OpAtomicSMax %4 %11 %10 %9 %12
# |                                      ^
# | <stdin>:34:38: note: with "UINT" equal to "4"
# |  %19 = OpAtomicSMax %4 %11 %10 %9 %12
# |                                      ^
# | <stdin>:34:38: note: with "SPTR" equal to "11"
# |  %19 = OpAtomicSMax %4 %11 %10 %9 %12
# |                                      ^
# | <stdin>:34:38: note: with "WORKGROUP_SCOPE" equal to "10"
# |  %19 = OpAtomicSMax %4 %11 %10 %9 %12
# |                                      ^
# | <stdin>:34:38: note: with "RELAXED" equal to "9"
# |  %19 = OpAtomicSMax %4 %11 %10 %9 %12
# |                                      ^
# | <stdin>:34:38: note: with "SVAL" equal to "12"
# |  %19 = OpAtomicSMax %4 %11 %10 %9 %12
# |                                      ^
# | <stdin>:42:2: note: possible intended match here
# |  %23 = OpAtomicUMin %4 %20 %10 %9 %21
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\SPIRV\transcoding\OpenCL\atomic_fetch_min_max.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            29:  %14 = OpAtomicSMin %4 %11 %10 %9 %12 
# |            30:  %15 = OpAtomicSMax %4 %11 %10 %9 %12 
# |            31:  %16 = OpAtomicSMin %4 %11 %10 %8 %12 
# |            32:  %17 = OpAtomicSMax %4 %11 %10 %8 %12 
# |            33:  %18 = OpAtomicSMin %4 %11 %10 %9 %12 
# |            34:  %19 = OpAtomicSMax %4 %11 %10 %9 %12 
# | check:45'0                                          X error: no match found
# | check:45'1                                            with "UINT" equal to "4"
# | check:45'2                                            with "SPTR" equal to "11"
# | check:45'3                                            with "WORKGROUP_SCOPE" equal to "10"
# | check:45'4                                            with "RELAXED" equal to "9"
# | check:45'5                                            with "SVAL" equal to "12"
# |            35:  OpReturn 
# | check:45'0     ~~~~~~~~~~
# |            36:  OpFunctionEnd 
# | check:45'0     ~~~~~~~~~~~~~~~
# |            37:  ; -- End function 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~
# |            38:  %22 = OpFunction %6 None %7 ; -- Begin function test_atomic_min_max_unsigned 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            39:  %20 = OpFunctionParameter %5 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            40:  %21 = OpFunctionParameter %4 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            41:  %3 = OpLabel 
# | check:45'0     ~~~~~~~~~~~~~~
# |            42:  %23 = OpAtomicUMin %4 %20 %10 %9 %21 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:45'6      ?                                     possible intended match
# |            43:  %24 = OpAtomicUMax %4 %20 %10 %9 %21 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            44:  %25 = OpAtomicUMin %4 %20 %10 %8 %21 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            45:  %26 = OpAtomicUMax %4 %20 %10 %8 %21 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            46:  %27 = OpAtomicUMin %4 %20 %10 %9 %21 
# | check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            47:  %28 = OpAtomicUMax %4 %20 %10 %9 %21 
# | check:45'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/190443


More information about the llvm-commits mailing list