1# REQUIRES: asserts 2# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -debug-counter=si-insert-waitcnts-forcelgkm-count=1 -o - %s | FileCheck -check-prefixes=GCN,LGKM %s 3# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -debug-counter=si-insert-waitcnts-forceexp-count=2 -o - %s | FileCheck -check-prefixes=GCN,EXP %s 4# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -debug-counter=si-insert-waitcnts-forcevm-count=3 -o - %s | FileCheck -check-prefixes=GCN,VM %s 5# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -amdgpu-waitcnt-forcezero=1 -debug-counter=si-insert-waitcnts-forcevm-count=2 -o - %s | FileCheck -check-prefixes=GCN,ZERO %s 6 7# check that the waitcnt pass options that force insertion of waitcnt instructions are working as expected 8 9... 10# GCN-LABEL: name: waitcnt-debug 11# LGKM: S_WAITCNT 127 12# LGKM-NEXT: S_NOP 0 13# LGKM-NEXT: S_NOP 0 14 15# EXP: S_WAITCNT 3855 16# EXP-NEXT: S_NOP 0 17# EXP-NEXT: S_WAITCNT 3855 18# EXP-NEXT: S_NOP 0 19 20# VM: S_WAITCNT 3952 21# VM-NEXT: S_NOP 0 22# VM-NEXT: S_WAITCNT 3952 23# VM-NEXT: S_NOP 0 24# VM-NEXT: S_WAITCNT 3952 25# VM-NEXT: S_NOP 0 26 27# ZERO: S_WAITCNT 0 28# ZERO-NEXT: S_WAITCNT 0 29# ZERO-NEXT: S_NOP 0 30# ZERO-NEXT: S_WAITCNT 0 31# ZERO-NEXT: S_NOP 0 32 33name: waitcnt-debug 34liveins: 35body: | 36 bb.0: 37 S_NOP 0 38 S_NOP 0 39 S_NOP 0 40 S_NOP 0 41... 42