Files
llvm-project/llvm/test/CodeGen/AMDGPU/asyncmark-waitcnt.mir
vporpo d394d153fb [AMDGPU][MIRFormatter] Printer & parser for S_WAITCNT human-readable mask (#193895)
This patch implements a printer and parser for the S_WAITCNT mask. It
prints the mask in a human-readable format, showing the counter values
like `Vmcnt_<NUM>_Expcnt_<NUM>_Lgkmcnt_<NUM>`.

The format matches the printing style of S_WAITCNT_DEPCTR. For example:
```
 S_WAITCNT .Vmcnt_0_Expcnt_0_Lgkmcnt_0
 S_WAITCNT .Expcnt_0
 S_WAITCNT .AllOff
```
Counters at their maximum value (meaning "don't wait") are omitted. When
all counters are at max, `.AllOff` is printed.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-04-28 14:34:46 -07:00

26 lines
733 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 .Vmcnt_0_Expcnt_0_Lgkmcnt_0
; CHECK-NEXT: ASYNCMARK
; CHECK-NEXT: S_ENDPGM 0
S_WAITCNT_soft 0
ASYNCMARK
S_ENDPGM 0
...