forked from OSchip/llvm-project
132 lines
5.2 KiB
YAML
132 lines
5.2 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX10 %s
|
|
|
|
---
|
|
name: test_waitcnt_preexisting_vscnt_unmodified
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; GFX10-LABEL: name: test_waitcnt_preexisting_vscnt_unmodified
|
|
; GFX10: S_WAITCNT 0
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: S_BARRIER
|
|
; GFX10: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_WAITCNT 112
|
|
; GFX10: FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_ENDPGM 0
|
|
GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
S_BARRIER
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
S_ENDPGM 0
|
|
...
|
|
|
|
---
|
|
name: test_waitcnt_preexisting_vscnt_needs_vscnt
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; GFX10-LABEL: name: test_waitcnt_preexisting_vscnt_needs_vscnt
|
|
; GFX10: S_WAITCNT 0
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: S_BARRIER
|
|
; GFX10: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_WAITCNT 112
|
|
; GFX10: FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_ENDPGM 0
|
|
GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 1
|
|
S_BARRIER
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
S_ENDPGM 0
|
|
...
|
|
|
|
---
|
|
name: test_waitcnt_preexisting_vscnt_with_other_waitcnt
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; GFX10-LABEL: name: test_waitcnt_preexisting_vscnt_with_other_waitcnt
|
|
; GFX10: S_WAITCNT 0
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
; GFX10: S_WAITCNT 112
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: S_BARRIER
|
|
; GFX10: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_WAITCNT 112
|
|
; GFX10: FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_ENDPGM 0
|
|
GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
S_WAITCNT 112
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
S_BARRIER
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
S_ENDPGM 0
|
|
...
|
|
|
|
---
|
|
name: test_waitcnt_preexisting_vscnt_combined
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; GFX10-LABEL: name: test_waitcnt_preexisting_vscnt_combined
|
|
; GFX10: S_WAITCNT 0
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: S_BARRIER
|
|
; GFX10: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_WAITCNT 112
|
|
; GFX10: FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_ENDPGM 0
|
|
GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 1
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 2
|
|
S_BARRIER
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
S_ENDPGM 0
|
|
...
|
|
|
|
---
|
|
name: test_waitcnt_preexisting_vscnt_combined_both_types
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; GFX10-LABEL: name: test_waitcnt_preexisting_vscnt_combined_both_types
|
|
; GFX10: S_WAITCNT 0
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
; GFX10: S_WAITCNT 0
|
|
; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
|
|
; GFX10: S_BARRIER
|
|
; GFX10: $vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_WAITCNT 112
|
|
; GFX10: FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
; GFX10: S_ENDPGM 0
|
|
GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
|
|
S_WAITCNT 0
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 1
|
|
S_WAITCNT 0
|
|
S_WAITCNT_VSCNT undef $sgpr_null, 2
|
|
S_WAITCNT 0
|
|
S_BARRIER
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
|
|
FLAT_STORE_DWORD $vgpr0_vgpr1, $vgpr0, 0, 0, implicit $exec, implicit $flat_scr
|
|
S_ENDPGM 0
|
|
...
|