Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/waitcnt-kmcnt-scc-different-block.mir
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

174 lines
7.2 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX12 %s
---
name: scc_write_in_other_block
body: |
; GFX12-LABEL: name: scc_write_in_other_block
; GFX12: bb.0:
; GFX12-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
; GFX12-NEXT: S_WAIT_EXPCNT 0
; GFX12-NEXT: S_WAIT_SAMPLECNT 0
; GFX12-NEXT: S_WAIT_BVHCNT 0
; GFX12-NEXT: S_WAIT_KMCNT 0
; GFX12-NEXT: S_CMP_EQ_U32 $sgpr0, 0, implicit-def $scc
; GFX12-NEXT: V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr0, implicit-def $exec, implicit $exec
; GFX12-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.1:
; GFX12-NEXT: successors: %bb.2(0x80000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: renamable $sgpr1 = S_CSELECT_B32 1, 0, implicit killed $scc
; GFX12-NEXT: S_BARRIER_SIGNAL_ISFIRST_IMM -1, implicit-def $scc, implicit killed $scc
; GFX12-NEXT: $vgpr2 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
; GFX12-NEXT: GLOBAL_STORE_DWORD $vgpr3_vgpr4, $vgpr2, 0, 0, implicit $exec
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.2:
; GFX12-NEXT: S_WAIT_KMCNT 0
; GFX12-NEXT: renamable $sgpr1 = S_CSELECT_B32 10, 20, implicit killed $scc
; GFX12-NEXT: $vgpr5 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
; GFX12-NEXT: GLOBAL_STORE_DWORD $vgpr6_vgpr7, $vgpr5, 0, 0, implicit $exec
; GFX12-NEXT: S_ENDPGM 0
bb.0:
S_CMP_EQ_U32 $sgpr0, 0, implicit-def $scc
V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr0, implicit-def $exec, implicit $exec
S_CBRANCH_EXECZ %bb.2, implicit $exec
bb.1:
renamable $sgpr1 = S_CSELECT_B32 1, 0, implicit killed $scc
S_BARRIER_SIGNAL_ISFIRST_IMM -1, implicit-def $scc, implicit killed $scc
$vgpr2 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
GLOBAL_STORE_DWORD $vgpr3_vgpr4, $vgpr2, 0, 0, implicit $exec
bb.2:
renamable $sgpr1 = S_CSELECT_B32 10, 20, implicit killed $scc
$vgpr5 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
GLOBAL_STORE_DWORD $vgpr6_vgpr7, $vgpr5, 0, 0, implicit $exec
S_ENDPGM 0
...
---
name: scc_write_in_other_block_with_barrier_wait
body: |
; GFX12-LABEL: name: scc_write_in_other_block_with_barrier_wait
; GFX12: bb.0:
; GFX12-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
; GFX12-NEXT: S_WAIT_EXPCNT 0
; GFX12-NEXT: S_WAIT_SAMPLECNT 0
; GFX12-NEXT: S_WAIT_BVHCNT 0
; GFX12-NEXT: S_WAIT_KMCNT 0
; GFX12-NEXT: S_CMP_EQ_U32 $sgpr0, 0, implicit-def $scc
; GFX12-NEXT: V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr0, implicit-def $exec, implicit $exec
; GFX12-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.1:
; GFX12-NEXT: successors: %bb.2(0x80000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: renamable $sgpr1 = S_CSELECT_B32 1, 0, implicit killed $scc
; GFX12-NEXT: S_BARRIER_SIGNAL_ISFIRST_IMM -1, implicit-def $scc, implicit killed $scc
; GFX12-NEXT: $vgpr2 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
; GFX12-NEXT: GLOBAL_STORE_DWORD $vgpr3_vgpr4, $vgpr2, 0, 0, implicit $exec
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.2:
; GFX12-NEXT: S_BARRIER_WAIT -1
; GFX12-NEXT: renamable $sgpr1 = S_CSELECT_B32 10, 20, implicit killed $scc
; GFX12-NEXT: $vgpr5 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
; GFX12-NEXT: GLOBAL_STORE_DWORD $vgpr6_vgpr7, $vgpr5, 0, 0, implicit $exec
; GFX12-NEXT: S_ENDPGM 0
bb.0:
S_CMP_EQ_U32 $sgpr0, 0, implicit-def $scc
V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr0, implicit-def $exec, implicit $exec
S_CBRANCH_EXECZ %bb.2, implicit $exec
bb.1:
renamable $sgpr1 = S_CSELECT_B32 1, 0, implicit killed $scc
S_BARRIER_SIGNAL_ISFIRST_IMM -1, implicit-def $scc, implicit killed $scc
$vgpr2 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
GLOBAL_STORE_DWORD $vgpr3_vgpr4, $vgpr2, 0, 0, implicit $exec
bb.2:
S_BARRIER_WAIT -1
renamable $sgpr1 = S_CSELECT_B32 10, 20, implicit killed $scc
$vgpr5 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
GLOBAL_STORE_DWORD $vgpr6_vgpr7, $vgpr5, 0, 0, implicit $exec
S_ENDPGM 0
...
---
name: scc_write_in_multiple_blocks_with_barrier_wait
body: |
; GFX12-LABEL: name: scc_write_in_multiple_blocks_with_barrier_wait
; GFX12: bb.0:
; GFX12-NEXT: successors: %bb.4(0x40000000), %bb.1(0x40000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
; GFX12-NEXT: S_WAIT_EXPCNT 0
; GFX12-NEXT: S_WAIT_SAMPLECNT 0
; GFX12-NEXT: S_WAIT_BVHCNT 0
; GFX12-NEXT: S_WAIT_KMCNT 0
; GFX12-NEXT: S_CMP_EQ_U32 $sgpr0, 0, implicit-def $scc
; GFX12-NEXT: V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr0, implicit-def $exec, implicit $exec
; GFX12-NEXT: S_CBRANCH_EXECZ %bb.4, implicit $exec
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.1:
; GFX12-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr1, implicit-def $exec, implicit $exec
; GFX12-NEXT: S_CBRANCH_EXECZ %bb.3, implicit $exec
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.2:
; GFX12-NEXT: successors: %bb.5(0x80000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: S_BARRIER_SIGNAL_ISFIRST_IMM 0, implicit-def $scc, implicit killed $scc
; GFX12-NEXT: S_BRANCH %bb.5
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.3:
; GFX12-NEXT: successors: %bb.5(0x80000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: S_BARRIER_SIGNAL_ISFIRST_IMM 1, implicit-def $scc, implicit killed $scc
; GFX12-NEXT: S_BRANCH %bb.5
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.4:
; GFX12-NEXT: successors: %bb.5(0x80000000)
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: S_BARRIER_SIGNAL_ISFIRST_IMM -1, implicit-def $scc, implicit killed $scc
; GFX12-NEXT: {{ $}}
; GFX12-NEXT: bb.5:
; GFX12-NEXT: S_BARRIER_WAIT -1
; GFX12-NEXT: S_WAIT_KMCNT 0
; GFX12-NEXT: renamable $sgpr1 = S_CSELECT_B32 10, 20, implicit killed $scc
; GFX12-NEXT: $vgpr5 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
; GFX12-NEXT: GLOBAL_STORE_DWORD $vgpr6_vgpr7, $vgpr5, 0, 0, implicit $exec
; GFX12-NEXT: S_ENDPGM 0
bb.0:
S_CMP_EQ_U32 $sgpr0, 0, implicit-def $scc
V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr0, implicit-def $exec, implicit $exec
S_CBRANCH_EXECZ %bb.4, implicit $exec
bb.1:
V_CMPX_EQ_U32_nosdst_e32 0, killed $vgpr1, implicit-def $exec, implicit $exec
S_CBRANCH_EXECZ %bb.3, implicit $exec
bb.2:
S_BARRIER_SIGNAL_ISFIRST_IMM 0, implicit-def $scc, implicit killed $scc
S_BRANCH %bb.5
bb.3:
S_BARRIER_SIGNAL_ISFIRST_IMM 1, implicit-def $scc, implicit killed $scc
S_BRANCH %bb.5
bb.4:
S_BARRIER_SIGNAL_ISFIRST_IMM -1, implicit-def $scc, implicit killed $scc
bb.5:
S_BARRIER_WAIT -1
renamable $sgpr1 = S_CSELECT_B32 10, 20, implicit killed $scc
$vgpr5 = V_MOV_B32_e32 $sgpr1, implicit $exec, implicit $exec
GLOBAL_STORE_DWORD $vgpr6_vgpr7, $vgpr5, 0, 0, implicit $exec
S_ENDPGM 0
...