| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6 | |
| # RUN: llc -mtriple=amdgpu12.50-amd-amdhsa -passes=si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX1250 %s | |
| # TENSOR_SAVE and TENSOR_STOP do not increment xcnt, so they must not be | |
| # counted when computing s_wait_xcnt for the address of an earlier global_load | |
| # or for an $exec def. | |
| --- | |
| name: vmem_load_then_tensor_save_then_addr_def | |
| body: | | |
| bb.0: | |
| liveins: $vgpr2_vgpr3, $sgpr0_sgpr1 | |
| ; GFX1250-LABEL: name: vmem_load_then_tensor_save_then_addr_def | |
| ; GFX1250: liveins: $vgpr2_vgpr3, $sgpr0_sgpr1 | |
| ; GFX1250-NEXT: {{ $}} | |
| ; GFX1250-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0 | |
| ; GFX1250-NEXT: S_WAIT_KMCNT 0 | |
| ; GFX1250-NEXT: $vgpr4 = GLOBAL_LOAD_DWORD $vgpr2_vgpr3, 0, 0, implicit $exec | |
| ; GFX1250-NEXT: TENSOR_SAVE $sgpr0_sgpr1, 0, 0, implicit $exec | |
| ; GFX1250-NEXT: S_WAIT_XCNT 0 | |
| ; GFX1250-NEXT: $vgpr2 = V_MOV_B32_e32 0, implicit $exec | |
| $vgpr4 = GLOBAL_LOAD_DWORD $vgpr2_vgpr3, 0, 0, implicit $exec | |
| TENSOR_SAVE $sgpr0_sgpr1, 0, 0, implicit $exec | |
| $vgpr2 = V_MOV_B32_e32 0, implicit $exec | |
| ... | |
| --- | |
| name: vmem_load_then_tensor_stop_then_addr_def | |
| body: | | |
| bb.0: | |
| liveins: $vgpr2_vgpr3 | |
| ; GFX1250-LABEL: name: vmem_load_then_tensor_stop_then_addr_def | |
| ; GFX1250: liveins: $vgpr2_vgpr3 | |
| ; GFX1250-NEXT: {{ $}} | |
| ; GFX1250-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0 | |
| ; GFX1250-NEXT: S_WAIT_KMCNT 0 | |
| ; GFX1250-NEXT: $vgpr4 = GLOBAL_LOAD_DWORD $vgpr2_vgpr3, 0, 0, implicit $exec | |
| ; GFX1250-NEXT: TENSOR_STOP 0, implicit $exec | |
| ; GFX1250-NEXT: S_WAIT_XCNT 0 | |
| ; GFX1250-NEXT: $vgpr2 = V_MOV_B32_e32 0, implicit $exec | |
| $vgpr4 = GLOBAL_LOAD_DWORD $vgpr2_vgpr3, 0, 0, implicit $exec | |
| TENSOR_STOP 0, implicit $exec | |
| $vgpr2 = V_MOV_B32_e32 0, implicit $exec | |
| ... | |
| --- | |
| name: tensor_save_then_exec_def | |
| body: | | |
| bb.0: | |
| liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 | |
| ; GFX1250-LABEL: name: tensor_save_then_exec_def | |
| ; GFX1250: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 | |
| ; GFX1250-NEXT: {{ $}} | |
| ; GFX1250-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0 | |
| ; GFX1250-NEXT: S_WAIT_KMCNT 0 | |
| ; GFX1250-NEXT: TENSOR_SAVE $sgpr0_sgpr1, 0, 0, implicit $exec | |
| ; GFX1250-NEXT: $exec = S_MOV_B64 $sgpr2_sgpr3 | |
| TENSOR_SAVE $sgpr0_sgpr1, 0, 0, implicit $exec | |
| $exec = S_MOV_B64 $sgpr2_sgpr3 | |
| ... | |
| --- | |
| name: tensor_stop_then_exec_def | |
| body: | | |
| bb.0: | |
| liveins: $sgpr0_sgpr1 | |
| ; GFX1250-LABEL: name: tensor_stop_then_exec_def | |
| ; GFX1250: liveins: $sgpr0_sgpr1 | |
| ; GFX1250-NEXT: {{ $}} | |
| ; GFX1250-NEXT: S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dscnt_0 | |
| ; GFX1250-NEXT: S_WAIT_KMCNT 0 | |
| ; GFX1250-NEXT: TENSOR_STOP 0, implicit $exec | |
| ; GFX1250-NEXT: $exec = S_MOV_B64 $sgpr0_sgpr1 | |
| TENSOR_STOP 0, implicit $exec | |
| $exec = S_MOV_B64 $sgpr0_sgpr1 | |
| ... |