blob: 891c16e45c1462dfaa5f795ce582bc6eaafe5244 [file] [edit]
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
# RUN: llc -mtriple=amdgpu12.00 -verify-machineinstrs -run-pass=si-insert-waitcnts -o - %s | FileCheck %s
# Checks that the WaitcntGenerator updates its behavior when we switch MFs
# with different attributes.
# There are 2 functions, each testing amdgpu-expert-scheduling-mode on and off.
#
# The bodies are identical and the only difference is the attribute.
--- |
define amdgpu_kernel void @test-wcg-attributes-noexpert() #0 { ret void }
define amdgpu_kernel void @test-wcg-attributes-expert() #1 { ret void }
attributes #0 = { "amdgpu-expert-scheduling-mode"="false" }
attributes #1 = { "amdgpu-expert-scheduling-mode"="true" }
...
---
name: test-wcg-attributes-noexpert
body: |
bb.0:
; CHECK-LABEL: name: test-wcg-attributes-noexpert
; CHECK: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
; CHECK-NEXT: S_WAIT_EXPCNT 0
; CHECK-NEXT: S_WAIT_SAMPLECNT 0
; CHECK-NEXT: S_WAIT_BVHCNT 0
; CHECK-NEXT: S_WAIT_KMCNT 0
; CHECK-NEXT: $vgpr1 = nofpexcept V_EXP_F32_e32 $vgpr0, implicit $mode, implicit $exec
; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = DS_READ_B128_gfx9 renamable $vgpr36, 8224, 0, implicit $exec
; CHECK-NEXT: S_ENDPGM 0
$vgpr1 = nofpexcept V_EXP_F32_e32 $vgpr0, implicit $mode, implicit $exec
$vgpr0_vgpr1_vgpr2_vgpr3 = DS_READ_B128_gfx9 renamable $vgpr36, 8224, 0, implicit $exec
S_ENDPGM 0
...
---
name: test-wcg-attributes-expert
body: |
bb.0:
; CHECK-LABEL: name: test-wcg-attributes-expert
; CHECK: S_SETREG_IMM32_B32 2, 2074, implicit-def $mode, implicit $mode
; CHECK-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0
; CHECK-NEXT: S_WAIT_EXPCNT 0
; CHECK-NEXT: S_WAIT_SAMPLECNT 0
; CHECK-NEXT: S_WAIT_BVHCNT 0
; CHECK-NEXT: S_WAIT_KMCNT 0
; CHECK-NEXT: $vgpr1 = nofpexcept V_EXP_F32_e32 $vgpr0, implicit $mode, implicit $exec
; CHECK-NEXT: S_WAITCNT_DEPCTR .VaVdst_0
; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = DS_READ_B128_gfx9 renamable $vgpr36, 8224, 0, implicit $exec
; CHECK-NEXT: S_ENDPGM 0
$vgpr1 = nofpexcept V_EXP_F32_e32 $vgpr0, implicit $mode, implicit $exec
$vgpr0_vgpr1_vgpr2_vgpr3 = DS_READ_B128_gfx9 renamable $vgpr36, 8224, 0, implicit $exec
S_ENDPGM 0
...