Skip to content

Commit 0ce7cbd

Browse files
authored
[AMDGPU] Add another test for missing S_WAIT_XCNT (#161838)
1 parent 7fbfbab commit 0ce7cbd

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

llvm/test/CodeGen/AMDGPU/wait-xcnt.mir

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,46 @@ body: |
945945
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
946946
...
947947

948+
# FIXME: Missing S_WAIT_XCNT before overwriting vgpr0.
949+
---
950+
name: wait_kmcnt_with_outstanding_vmem_2
951+
tracksRegLiveness: true
952+
machineFunctionInfo:
953+
isEntryFunction: true
954+
body: |
955+
; GCN-LABEL: name: wait_kmcnt_with_outstanding_vmem_2
956+
; GCN: bb.0:
957+
; GCN-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
958+
; GCN-NEXT: liveins: $vgpr0_vgpr1, $sgpr0_sgpr1, $scc
959+
; GCN-NEXT: {{ $}}
960+
; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
961+
; GCN-NEXT: S_CBRANCH_SCC1 %bb.2, implicit $scc
962+
; GCN-NEXT: {{ $}}
963+
; GCN-NEXT: bb.1:
964+
; GCN-NEXT: successors: %bb.2(0x80000000)
965+
; GCN-NEXT: liveins: $vgpr0_vgpr1, $sgpr2
966+
; GCN-NEXT: {{ $}}
967+
; GCN-NEXT: $vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
968+
; GCN-NEXT: {{ $}}
969+
; GCN-NEXT: bb.2:
970+
; GCN-NEXT: liveins: $sgpr2
971+
; GCN-NEXT: {{ $}}
972+
; GCN-NEXT: S_WAIT_KMCNT 0
973+
; GCN-NEXT: $sgpr2 = S_MOV_B32 $sgpr2
974+
; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
975+
bb.0:
976+
liveins: $vgpr0_vgpr1, $sgpr0_sgpr1, $scc
977+
$sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
978+
S_CBRANCH_SCC1 %bb.2, implicit $scc
979+
bb.1:
980+
liveins: $vgpr0_vgpr1, $sgpr2
981+
$vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
982+
bb.2:
983+
liveins: $sgpr2
984+
$sgpr2 = S_MOV_B32 $sgpr2
985+
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
986+
...
987+
948988
---
949989
name: wait_loadcnt_with_outstanding_smem
950990
tracksRegLiveness: true

0 commit comments

Comments
 (0)