@@ -920,3 +920,49 @@ body: |
920920 GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr3, 0, 0, implicit $exec
921921 $vgpr2 = V_MOV_B32_e32 1, implicit $exec
922922 ...
923+
924+ # FIXME: Missing S_WAIT_XCNT before overwriting vgpr0.
925+ ---
926+ name : wait_kmcnt_with_outstanding_vmem
927+ tracksRegLiveness : true
928+ machineFunctionInfo :
929+ isEntryFunction : true
930+ body : |
931+ bb.0:
932+ liveins: $vgpr0_vgpr1, $sgpr0_sgpr1
933+ ; GCN-LABEL: name: wait_kmcnt_with_outstanding_vmem
934+ ; GCN: liveins: $vgpr0_vgpr1, $sgpr0_sgpr1
935+ ; GCN-NEXT: {{ $}}
936+ ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
937+ ; GCN-NEXT: $vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
938+ ; GCN-NEXT: S_WAIT_KMCNT 0
939+ ; GCN-NEXT: $sgpr2 = S_MOV_B32 $sgpr2
940+ ; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
941+ $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
942+ $vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
943+ $sgpr2 = S_MOV_B32 $sgpr2
944+ $vgpr0 = V_MOV_B32_e32 0, implicit $exec
945+ ...
946+
947+ # FIXME: Missing S_WAIT_XCNT before overwriting sgpr0.
948+ ---
949+ name : wait_loadcnt_with_outstanding_smem
950+ tracksRegLiveness : true
951+ machineFunctionInfo :
952+ isEntryFunction : true
953+ body : |
954+ bb.0:
955+ liveins: $vgpr0_vgpr1, $sgpr0_sgpr1
956+ ; GCN-LABEL: name: wait_loadcnt_with_outstanding_smem
957+ ; GCN: liveins: $vgpr0_vgpr1, $sgpr0_sgpr1
958+ ; GCN-NEXT: {{ $}}
959+ ; GCN-NEXT: $vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
960+ ; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
961+ ; GCN-NEXT: S_WAIT_LOADCNT 0
962+ ; GCN-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr2, implicit $exec
963+ ; GCN-NEXT: $sgpr0 = S_MOV_B32 0
964+ $vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
965+ $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
966+ $vgpr2 = V_MOV_B32_e32 $vgpr2, implicit $exec
967+ $sgpr0 = S_MOV_B32 0
968+ ...
0 commit comments