1# REQUIRES: asserts 2# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -debug-counter=si-insert-waitcnts-forcelgkm=0 -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=0-1 -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=0-2 -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=0-1 -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_NOP 0 29# ZERO-NEXT: S_WAITCNT 0 30# ZERO-NEXT: S_NOP 0 31# ZERO-NEXT: S_WAITCNT 0 32# ZERO-NEXT: S_NOP 0 33 34name: waitcnt-debug 35liveins: 36machineFunctionInfo: 37 isEntryFunction: true 38body: | 39 bb.0: 40 S_NOP 0 41 S_NOP 0 42 S_NOP 0 43 S_NOP 0 44... 45