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
140 lines
5.3 KiB
YAML
140 lines
5.3 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
|
|
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 -run-pass=si-insert-waitcnts -o - %s | FileCheck %s
|
|
|
|
# Regression test for mergeAsyncMarks() asserting when OtherMarks is empty.
|
|
#
|
|
# At a CFG join point where one predecessor has an ASYNCMARK (non-empty
|
|
# AsyncMarks) and the other does not (empty OtherMarks), MergeCount becomes
|
|
# min(0, N) = 0. Before the fix, seq_inclusive<unsigned>(1, 0) asserted
|
|
# Begin <= End. After the fix the function returns early when either side
|
|
# is empty.
|
|
#
|
|
# GLOBAL_LOAD_ASYNC_TO_LDS_B32 is a GFX1250 async LDS DMA instruction tracked
|
|
# via ASYNC_CNT. isAsync() returns true for it, so the score is recorded into
|
|
# AsyncScore before ASYNCMARK pushes it onto AsyncMarks.
|
|
#
|
|
# The join block contains WAIT_ASYNCMARK 0 to consume the pending mark.
|
|
# Before the fix, mergeAsyncMarks() asserted before reaching the wait.
|
|
# After the fix the pass completes without asserting.
|
|
#
|
|
# Two patterns are tested:
|
|
# asyncmark_in_then - ASYNCMARK in the then-successor, else-successor is sync
|
|
# asyncmark_in_else - ASYNCMARK in the else-successor, then-successor is sync
|
|
|
|
---
|
|
# Pattern 1: ASYNCMARK in then-successor, else-successor is sync.
|
|
name: asyncmark_in_then
|
|
tracksRegLiveness: true
|
|
machineFunctionInfo:
|
|
occupancy: 8
|
|
body: |
|
|
; CHECK-LABEL: name: asyncmark_in_then
|
|
; CHECK: bb.0:
|
|
; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
|
|
; CHECK-NEXT: liveins: $sgpr0, $sgpr1, $vgpr0_vgpr1, $vgpr2
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
|
|
; CHECK-NEXT: S_WAIT_KMCNT 0
|
|
; CHECK-NEXT: S_CMP_LG_U32 $sgpr0, $sgpr1, implicit-def $scc
|
|
; CHECK-NEXT: S_CBRANCH_SCC1 %bb.2, implicit killed $scc
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: bb.1:
|
|
; CHECK-NEXT: successors: %bb.3(0x80000000)
|
|
; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: GLOBAL_LOAD_ASYNC_TO_LDS_B32 $vgpr2, $vgpr0_vgpr1, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load (s32), addrspace 1), (store (s32), addrspace 3)
|
|
; CHECK-NEXT: ASYNCMARK
|
|
; CHECK-NEXT: S_BRANCH %bb.3
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: bb.2:
|
|
; CHECK-NEXT: successors: %bb.3(0x80000000)
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: S_BRANCH %bb.3
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: bb.3:
|
|
; CHECK-NEXT: WAIT_ASYNCMARK 0
|
|
; CHECK-NEXT: S_WAIT_ASYNCCNT 0, implicit-def $asynccnt, implicit $asynccnt
|
|
; CHECK-NEXT: S_ENDPGM 0
|
|
bb.0:
|
|
liveins: $sgpr0, $sgpr1, $vgpr0_vgpr1, $vgpr2
|
|
|
|
S_CMP_LG_U32 $sgpr0, $sgpr1, implicit-def $scc
|
|
S_CBRANCH_SCC1 %bb.2, implicit killed $scc
|
|
|
|
; then branch — issues async LDS DMA + ASYNCMARK
|
|
bb.1:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
GLOBAL_LOAD_ASYNC_TO_LDS_B32 $vgpr2, $vgpr0_vgpr1, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load (s32), addrspace 1), (store (s32), addrspace 3)
|
|
ASYNCMARK
|
|
S_BRANCH %bb.3
|
|
|
|
; else branch — sync path, no async operations; OtherMarks is empty at join
|
|
bb.2:
|
|
S_BRANCH %bb.3
|
|
|
|
; join — mergeAsyncMarks sees non-empty AsyncMarks (then) and empty OtherMarks (else).
|
|
; Before fix: assertion. After fix: returns early, no spurious wait inserted.
|
|
bb.3:
|
|
WAIT_ASYNCMARK 0
|
|
S_ENDPGM 0
|
|
...
|
|
---
|
|
# Pattern 2: ASYNCMARK in else-successor, then-successor is sync.
|
|
# Mirror of asyncmark_in_then — exercises the opposite predecessor ordering.
|
|
name: asyncmark_in_else
|
|
tracksRegLiveness: true
|
|
machineFunctionInfo:
|
|
occupancy: 8
|
|
body: |
|
|
; CHECK-LABEL: name: asyncmark_in_else
|
|
; CHECK: bb.0:
|
|
; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
|
|
; CHECK-NEXT: liveins: $sgpr0, $sgpr1, $vgpr0_vgpr1, $vgpr2
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
|
|
; CHECK-NEXT: S_WAIT_KMCNT 0
|
|
; CHECK-NEXT: S_CMP_LG_U32 $sgpr0, $sgpr1, implicit-def $scc
|
|
; CHECK-NEXT: S_CBRANCH_SCC1 %bb.2, implicit killed $scc
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: bb.1:
|
|
; CHECK-NEXT: successors: %bb.3(0x80000000)
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: S_BRANCH %bb.3
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: bb.2:
|
|
; CHECK-NEXT: successors: %bb.3(0x80000000)
|
|
; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: GLOBAL_LOAD_ASYNC_TO_LDS_B32 $vgpr2, $vgpr0_vgpr1, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load (s32), addrspace 1), (store (s32), addrspace 3)
|
|
; CHECK-NEXT: ASYNCMARK
|
|
; CHECK-NEXT: S_BRANCH %bb.3
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: bb.3:
|
|
; CHECK-NEXT: WAIT_ASYNCMARK 0
|
|
; CHECK-NEXT: S_WAIT_ASYNCCNT 0, implicit-def $asynccnt, implicit $asynccnt
|
|
; CHECK-NEXT: S_ENDPGM 0
|
|
bb.0:
|
|
liveins: $sgpr0, $sgpr1, $vgpr0_vgpr1, $vgpr2
|
|
|
|
S_CMP_LG_U32 $sgpr0, $sgpr1, implicit-def $scc
|
|
S_CBRANCH_SCC1 %bb.2, implicit killed $scc
|
|
|
|
; then branch — sync path, no async operations
|
|
bb.1:
|
|
S_BRANCH %bb.3
|
|
|
|
; else branch — issues async LDS DMA + ASYNCMARK
|
|
bb.2:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
GLOBAL_LOAD_ASYNC_TO_LDS_B32 $vgpr2, $vgpr0_vgpr1, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load (s32), addrspace 1), (store (s32), addrspace 3)
|
|
ASYNCMARK
|
|
S_BRANCH %bb.3
|
|
|
|
; join block
|
|
bb.3:
|
|
WAIT_ASYNCMARK 0
|
|
S_ENDPGM 0
|
|
...
|