[llvm] AMDGPU: Add codegen for atomicrmw operations usub_cond and usub_sat (PR #141068)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 03:23:46 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 166805 tests passed
* 2909 tests skipped
* 3 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/atomicrmw_usub_cond.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx900 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_cond.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX9-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_cond.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx900
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX9-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_cond.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_cond.ll:13:19: error: GFX9-SDAG-NEXT: is not on the line after the previous match
# | ; GFX9-SDAG-NEXT: v_mov_b32_e32 v1, s1
# |                   ^
# | <stdin>:24:2: note: 'next' match was here
# |  v_mov_b32_e32 v1, s1
# |  ^
# | <stdin>:20:22: note: previous match ended here
# |  s_waitcnt lgkmcnt(0)
# |                      ^
# | <stdin>:21:1: note: non-matching line after previous match is here
# |  s_add_u32 s0, s0, -16
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_cond.ll:104:19: error: GFX9-SDAG-NEXT: expected string not found in input
# | ; GFX9-SDAG-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x24
# |                   ^
# | <stdin>:95:18: note: scanning from here
# | ; %bb.0: ; %entry
# |                  ^
# | <stdin>:96:2: note: possible intended match here
# |  s_load_dwordx2 s[0:1], s[4:5], 0x24
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_cond.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            19:  s_load_dword s2, s[4:5], 0x2c 
# |            20:  s_waitcnt lgkmcnt(0) 
# |            21:  s_add_u32 s0, s0, -16 
# |            22:  s_addc_u32 s1, s1, -1 
# |            23:  v_mov_b32_e32 v0, s0 
# |            24:  v_mov_b32_e32 v1, s1 
# | next:13         !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |            25:  flat_load_dword v3, v[0:1] 
# |            26:  s_mov_b64 s[0:1], 0 
# |            27: .LBB0_1: ; %atomicrmw.start 
# |            28:  ; =>This Inner Loop Header: Depth=1 
# |            29:  s_waitcnt vmcnt(0) lgkmcnt(0) 
# |             .
# |             .
# |             .
# |            90:  .text 
# |            91:  .globl flat_atomic_usub_cond_rtn_u32 ; -- Begin function flat_atomic_usub_cond_rtn_u32 
# |            92:  .p2align 8 
# |            93:  .type flat_atomic_usub_cond_rtn_u32, at function 
# |            94: flat_atomic_usub_cond_rtn_u32: ; @flat_atomic_usub_cond_rtn_u32 
# |            95: ; %bb.0: ; %entry 
# | next:104'0                      X error: no match found
# |            96:  s_load_dwordx2 s[0:1], s[4:5], 0x24 
# | next:104'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:104'1      ?                                    possible intended match
# |            97:  s_load_dword s6, s[4:5], 0x2c 
# | next:104'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            98:  s_waitcnt lgkmcnt(0) 
# | next:104'0     ~~~~~~~~~~~~~~~~~~~~~~
# |            99:  s_add_u32 s2, s0, 16 
# | next:104'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           100:  s_addc_u32 s3, s1, 0 
# | next:104'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           101:  v_mov_b32_e32 v0, s2 
# | next:104'0     ~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/atomicrmw_usub_sat.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX9-GISEL
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900
# 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/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX9-GISEL
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX10-GISEL
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030
# 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/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX10-GISEL
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX11-GISEL
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100
# 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/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX11-GISEL
# note: command had no output on stdout or stderr
# RUN: at line 5
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX12-GISEL
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200
# 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/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll -check-prefix=GFX12-GISEL
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:894:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:362:33: note: scanning from here
# |  v_cmp_eq_u32_e32 vcc_lo, v3, v4
# |                                 ^
# | <stdin>:363:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:1123:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:419:33: note: scanning from here
# |  v_cmp_eq_u32_e32 vcc_lo, v3, v4
# |                                 ^
# | <stdin>:420:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:1349:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:475:22: note: scanning from here
# |  v_mov_b32_e32 v4, v3
# |                      ^
# | <stdin>:476:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:1569:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:530:22: note: scanning from here
# |  v_mov_b32_e32 v4, v3
# |                      ^
# | <stdin>:531:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:1812:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:583:33: note: scanning from here
# |  v_cmp_eq_u32_e32 vcc_lo, v1, v2
# |                                 ^
# | <stdin>:584:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:2070:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:697:22: note: scanning from here
# |  v_mov_b32_e32 v1, v0
# |                      ^
# | <stdin>:698:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:2317:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:813:33: note: scanning from here
# |  v_cmp_eq_u32_e32 vcc_lo, v3, v4
# |                                 ^
# | <stdin>:814:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:2569:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:874:33: note: scanning from here
# |  v_cmp_eq_u32_e32 vcc_lo, v3, v4
# |                                 ^
# | <stdin>:875:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:2817:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:934:22: note: scanning from here
# |  v_mov_b32_e32 v3, v2
# |                      ^
# | <stdin>:935:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:3058:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:993:22: note: scanning from here
# |  v_mov_b32_e32 v3, v2
# |                      ^
# | <stdin>:994:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:3324:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:1051:33: note: scanning from here
# |  v_cmp_eq_u32_e32 vcc_lo, v1, v2
# |                                 ^
# | <stdin>:1052:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll:3607:21: error: GFX12-GISEL-NEXT: expected string not found in input
# | ; GFX12-GISEL-NEXT: s_wait_alu 0xfffe
# |                     ^
# | <stdin>:1170:22: note: scanning from here
# |  v_mov_b32_e32 v1, v0
# |                      ^
# | <stdin>:1171:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            357:  v_and_or_b32 v3, 0xffff0000, v4, v3 
# |            358:  s_wait_storecnt 0x0 
# |            359:  global_atomic_cmpswap_b32 v3, v[0:1], v[3:4], off th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            360:  s_wait_loadcnt 0x0 
# |            361:  global_inv scope:SCOPE_DEV 
# |            362:  v_cmp_eq_u32_e32 vcc_lo, v3, v4 
# | next:894'0                                      X error: no match found
# |            363:  s_wait_alu depctr_sa_sdst(0) 
# | next:894'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:894'1       ?                             possible intended match
# |            364:  s_or_b32 s0, vcc_lo, s0 
# | next:894'0      ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            365:  s_wait_alu depctr_sa_sdst(0) 
# | next:894'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            366:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:894'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            367:  s_cbranch_execnz .LBB6_1 
# | next:894'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            368: ; %bb.2: ; %atomicrmw.end 
# | next:894'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            414:  v_and_or_b32 v3, 0xffff0000, v4, v3 
# |            415:  s_wait_storecnt 0x0 
# |            416:  global_atomic_cmpswap_b32 v3, v[0:1], v[3:4], off offset:2048 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            417:  s_wait_loadcnt 0x0 
# |            418:  global_inv scope:SCOPE_DEV 
# |            419:  v_cmp_eq_u32_e32 vcc_lo, v3, v4 
# | next:1123'0                                     X error: no match found
# |            420:  s_wait_alu depctr_sa_sdst(0) 
# | next:1123'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:1123'1      ?                             possible intended match
# |            421:  s_or_b32 s0, vcc_lo, s0 
# | next:1123'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            422:  s_wait_alu depctr_sa_sdst(0) 
# | next:1123'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            423:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:1123'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            424:  s_cbranch_execnz .LBB7_1 
# | next:1123'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            425: ; %bb.2: ; %atomicrmw.end 
# | next:1123'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            470:  s_wait_storecnt 0x0 
# |            471:  global_atomic_cmpswap_b32 v3, v[0:1], v[3:4], off th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            472:  s_wait_loadcnt 0x0 
# |            473:  global_inv scope:SCOPE_DEV 
# |            474:  v_cmp_eq_u32_e32 vcc_lo, v3, v4 
# |            475:  v_mov_b32_e32 v4, v3 
# | next:1349'0                          X error: no match found
# |            476:  s_wait_alu depctr_sa_sdst(0) 
# | next:1349'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:1349'1      ?                             possible intended match
# |            477:  s_or_b32 s0, vcc_lo, s0 
# | next:1349'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            478:  s_wait_alu depctr_sa_sdst(0) 
# | next:1349'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            479:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:1349'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            480:  s_cbranch_execnz .LBB8_1 
# | next:1349'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            481: ; %bb.2: ; %atomicrmw.end 
# | next:1349'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            525:  s_wait_storecnt 0x0 
# |            526:  global_atomic_cmpswap_b32 v3, v[0:1], v[3:4], off offset:2048 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            527:  s_wait_loadcnt 0x0 
# |            528:  global_inv scope:SCOPE_DEV 
# |            529:  v_cmp_eq_u32_e32 vcc_lo, v3, v4 
# |            530:  v_mov_b32_e32 v4, v3 
# | next:1569'0                          X error: no match found
# |            531:  s_wait_alu depctr_sa_sdst(0) 
# | next:1569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:1569'1      ?                             possible intended match
# |            532:  s_or_b32 s0, vcc_lo, s0 
# | next:1569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            533:  s_wait_alu depctr_sa_sdst(0) 
# | next:1569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            534:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:1569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            535:  s_cbranch_execnz .LBB9_1 
# | next:1569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            536: ; %bb.2: ; %atomicrmw.end 
# | next:1569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            578:  v_and_b32_e32 v1, 0xffff, v1 
# |            579:  v_and_or_b32 v1, 0xffff0000, v2, v1 
# |            580:  global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:2048 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            581:  s_wait_loadcnt 0x0 
# |            582:  global_inv scope:SCOPE_DEV 
# |            583:  v_cmp_eq_u32_e32 vcc_lo, v1, v2 
# | next:1812'0                                     X error: no match found
# |            584:  s_wait_alu depctr_sa_sdst(0) 
# | next:1812'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:1812'1      ?                             possible intended match
# |            585:  s_or_b32 s3, vcc_lo, s3 
# | next:1812'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            586:  s_wait_alu depctr_sa_sdst(0) 
# | next:1812'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            587:  s_and_not1_b32 exec_lo, exec_lo, s3 
# | next:1812'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            588:  s_cbranch_execnz .LBB10_1 
# | next:1812'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            589: ; %bb.2: ; %atomicrmw.end 
# | next:1812'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            692:  v_and_or_b32 v0, 0xffff0000, v1, v0 
# |            693:  global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] offset:2048 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            694:  s_wait_loadcnt 0x0 
# |            695:  global_inv scope:SCOPE_DEV 
# |            696:  v_cmp_eq_u32_e32 vcc_lo, v0, v1 
# |            697:  v_mov_b32_e32 v1, v0 
# | next:2070'0                          X error: no match found
# |            698:  s_wait_alu depctr_sa_sdst(0) 
# | next:2070'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:2070'1      ?                             possible intended match
# |            699:  s_or_b32 s3, vcc_lo, s3 
# | next:2070'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            700:  s_wait_alu depctr_sa_sdst(0) 
# | next:2070'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            701:  s_and_not1_b32 exec_lo, exec_lo, s3 
# | next:2070'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            702:  s_cbranch_execnz .LBB11_1 
# | next:2070'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            703: ; %bb.2: ; %atomicrmw.end 
# | next:2070'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            808:  v_and_or_b32 v3, 0xffffff00, v4, v3 
# |            809:  s_wait_storecnt 0x0 
# |            810:  global_atomic_cmpswap_b32 v3, v[0:1], v[3:4], off th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            811:  s_wait_loadcnt 0x0 
# |            812:  global_inv scope:SCOPE_DEV 
# |            813:  v_cmp_eq_u32_e32 vcc_lo, v3, v4 
# | next:2317'0                                     X error: no match found
# |            814:  s_wait_alu depctr_sa_sdst(0) 
# | next:2317'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:2317'1      ?                             possible intended match
# |            815:  s_or_b32 s0, vcc_lo, s0 
# | next:2317'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            816:  s_wait_alu depctr_sa_sdst(0) 
# | next:2317'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            817:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:2317'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            818:  s_cbranch_execnz .LBB12_1 
# | next:2317'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            819: ; %bb.2: ; %atomicrmw.end 
# | next:2317'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            869:  v_and_or_b32 v3, 0xffffff00, v4, v3 
# |            870:  s_wait_storecnt 0x0 
# |            871:  global_atomic_cmpswap_b32 v3, v[0:1], v[3:4], off offset:1024 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            872:  s_wait_loadcnt 0x0 
# |            873:  global_inv scope:SCOPE_DEV 
# |            874:  v_cmp_eq_u32_e32 vcc_lo, v3, v4 
# | next:2569'0                                     X error: no match found
# |            875:  s_wait_alu depctr_sa_sdst(0) 
# | next:2569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:2569'1      ?                             possible intended match
# |            876:  s_or_b32 s0, vcc_lo, s0 
# | next:2569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            877:  s_wait_alu depctr_sa_sdst(0) 
# | next:2569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            878:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:2569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            879:  s_cbranch_execnz .LBB13_1 
# | next:2569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            880: ; %bb.2: ; %atomicrmw.end 
# | next:2569'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            929:  s_wait_storecnt 0x0 
# |            930:  global_atomic_cmpswap_b32 v2, v[0:1], v[2:3], off th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            931:  s_wait_loadcnt 0x0 
# |            932:  global_inv scope:SCOPE_DEV 
# |            933:  v_cmp_eq_u32_e32 vcc_lo, v2, v3 
# |            934:  v_mov_b32_e32 v3, v2 
# | next:2817'0                          X error: no match found
# |            935:  s_wait_alu depctr_sa_sdst(0) 
# | next:2817'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:2817'1      ?                             possible intended match
# |            936:  s_or_b32 s0, vcc_lo, s0 
# | next:2817'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            937:  s_wait_alu depctr_sa_sdst(0) 
# | next:2817'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            938:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:2817'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            939:  s_cbranch_execnz .LBB14_1 
# | next:2817'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            940: ; %bb.2: ; %atomicrmw.end 
# | next:2817'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            988:  s_wait_storecnt 0x0 
# |            989:  global_atomic_cmpswap_b32 v2, v[0:1], v[2:3], off offset:1024 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |            990:  s_wait_loadcnt 0x0 
# |            991:  global_inv scope:SCOPE_DEV 
# |            992:  v_cmp_eq_u32_e32 vcc_lo, v2, v3 
# |            993:  v_mov_b32_e32 v3, v2 
# | next:3058'0                          X error: no match found
# |            994:  s_wait_alu depctr_sa_sdst(0) 
# | next:3058'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:3058'1      ?                             possible intended match
# |            995:  s_or_b32 s0, vcc_lo, s0 
# | next:3058'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            996:  s_wait_alu depctr_sa_sdst(0) 
# | next:3058'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            997:  s_and_not1_b32 exec_lo, exec_lo, s0 
# | next:3058'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            998:  s_cbranch_execnz .LBB15_1 
# | next:3058'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            999: ; %bb.2: ; %atomicrmw.end 
# | next:3058'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |           1046:  v_and_b32_e32 v1, 0xff, v1 
# |           1047:  v_and_or_b32 v1, 0xffffff00, v2, v1 
# |           1048:  global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:1024 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |           1049:  s_wait_loadcnt 0x0 
# |           1050:  global_inv scope:SCOPE_DEV 
# |           1051:  v_cmp_eq_u32_e32 vcc_lo, v1, v2 
# | next:3324'0                                     X error: no match found
# |           1052:  s_wait_alu depctr_sa_sdst(0) 
# | next:3324'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:3324'1      ?                             possible intended match
# |           1053:  s_or_b32 s3, vcc_lo, s3 
# | next:3324'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1054:  s_wait_alu depctr_sa_sdst(0) 
# | next:3324'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1055:  s_and_not1_b32 exec_lo, exec_lo, s3 
# | next:3324'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1056:  s_cbranch_execnz .LBB16_1 
# | next:3324'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1057: ; %bb.2: ; %atomicrmw.end 
# | next:3324'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |           1165:  v_and_or_b32 v0, 0xffffff00, v1, v0 
# |           1166:  global_atomic_cmpswap_b32 v0, v2, v[0:1], s[0:1] offset:1024 th:TH_ATOMIC_RETURN scope:SCOPE_DEV 
# |           1167:  s_wait_loadcnt 0x0 
# |           1168:  global_inv scope:SCOPE_DEV 
# |           1169:  v_cmp_eq_u32_e32 vcc_lo, v0, v1 
# |           1170:  v_mov_b32_e32 v1, v0 
# | next:3607'0                          X error: no match found
# |           1171:  s_wait_alu depctr_sa_sdst(0) 
# | next:3607'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:3607'1      ?                             possible intended match
# |           1172:  s_or_b32 s3, vcc_lo, s3 
# | next:3607'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1173:  s_wait_alu depctr_sa_sdst(0) 
# | next:3607'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1174:  s_and_not1_b32 exec_lo, exec_lo, s3 
# | next:3607'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1175:  s_cbranch_execnz .LBB17_1 
# | next:3607'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1176: ; %bb.2: ; %atomicrmw.end 
# | next:3607'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/atomics_cond_sub.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX12-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX12-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll:97:20: error: GFX12-SDAG-NEXT: is not on the line after the previous match
# | ; GFX12-SDAG-NEXT: v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
# |                    ^
# | <stdin>:204:2: note: 'next' match was here
# |  v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
# |  ^
# | <stdin>:201:18: note: previous match ended here
# |  s_wait_kmcnt 0x0
# |                  ^
# | <stdin>:202:1: note: non-matching line after previous match is here
# |  s_add_nc_u64 s[0:1], s[0:1], -16
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll:124:20: error: GFX12-SDAG-NEXT: is not on the line after the previous match
# | ; GFX12-SDAG-NEXT: v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
# |                    ^
# | <stdin>:264:2: note: 'next' match was here
# |  v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
# |  ^
# | <stdin>:261:18: note: previous match ended here
# |  s_wait_kmcnt 0x0
# |                  ^
# | <stdin>:262:1: note: non-matching line after previous match is here
# |  s_add_nc_u64 s[0:1], s[0:1], -16
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll:153:20: error: GFX12-SDAG-NEXT: is not on the line after the previous match
# | ; GFX12-SDAG-NEXT: v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
# |                    ^
# | <stdin>:326:2: note: 'next' match was here
# |  v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
# |  ^
# | <stdin>:323:18: note: previous match ended here
# |  s_wait_kmcnt 0x0
# |                  ^
# | <stdin>:324:1: note: non-matching line after previous match is here
# |  s_add_nc_u64 s[0:1], s[0:1], 16
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/atomics_cond_sub.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |         199: ; %bb.0: ; %entry 
# |         200:  s_load_b96 s[0:2], s[4:5], 0x24 
# |         201:  s_wait_kmcnt 0x0 
# |         202:  s_add_nc_u64 s[0:1], s[0:1], -16 
# |         203:  v_mov_b32_e32 v2, s2 
# |         204:  v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1 
# | next:97       !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         205:  flat_atomic_cond_sub_u32 v0, v[0:1], v2 th:TH_ATOMIC_RETURN 
# |         206:  s_endpgm 
# |         207: .Lfunc_end3: 
# |         208:  .size global_atomic_cond_sub_no_rtn_u32, .Lfunc_end3-global_atomic_cond_sub_no_rtn_u32 
# |         209:  ; -- End function 
# |           .
# |           .
# |           .
# |         259: ; %bb.0: ; %entry 
# |         260:  s_load_b96 s[0:2], s[4:5], 0x24 
# |         261:  s_wait_kmcnt 0x0 
# |         262:  s_add_nc_u64 s[0:1], s[0:1], -16 
# |         263:  v_mov_b32_e32 v2, s2 
# |         264:  v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1 
# | next:124      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         265:  flat_atomic_cond_sub_u32 v[0:1], v2 
# |         266:  s_endpgm 
# |         267: .Lfunc_end4: 
# |         268:  .size global_atomic_cond_sub_no_rtn_u32_forced, .Lfunc_end4-global_atomic_cond_sub_no_rtn_u32_forced 
# |         269:  ; -- End function 
# |           .
# |           .
# |           .
# |         321:  s_load_b96 s[0:2], s[4:5], 0x24 
# |         322:  s_load_b64 s[4:5], s[4:5], 0x34 
# |         323:  s_wait_kmcnt 0x0 
# |         324:  s_add_nc_u64 s[0:1], s[0:1], 16 
# |         325:  v_mov_b32_e32 v2, s2 
# |         326:  v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1 
# | next:153      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         327:  flat_atomic_cond_sub_u32 v0, v[0:1], v2 th:TH_ATOMIC_RETURN 
# |         328:  v_mov_b32_e32 v1, 0 
# |         329:  s_wait_loadcnt 0x0 
# |         330:  global_store_b32 v1, v0, s[4:5] 
# |         331:  s_endpgm 
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# 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/141068


More information about the llvm-commits mailing list