llvm-project/llvm/test/CodeGen/AMDGPU/asyncmark-waitcnt.mir
Ryan Mitchell 918d0feb76
[AMDGPU] fix asyncmark soft waitcnt bug (#184851)
Asyncmarks record the current wait state and so should not allow waitcnts that occur after them to be merged into waitcnts that occur before.
2026-03-06 11:38:32 -08:00

26 lines
707 B
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass=si-insert-waitcnts -o - %s | FileCheck %s
--- |
define void @asyncmark_preexisting_waitcnt() { unreachable }
...
---
name: asyncmark_preexisting_waitcnt
tracksRegLiveness: true
machineFunctionInfo:
occupancy: 16
body: |
bb.0:
liveins: $vgpr0
; CHECK-LABEL: name: asyncmark_preexisting_waitcnt
; CHECK: liveins: $vgpr0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: S_WAITCNT 0
; CHECK-NEXT: ASYNCMARK
; CHECK-NEXT: S_ENDPGM 0
S_WAITCNT_soft 0
ASYNCMARK
S_ENDPGM 0
...