Skip to content

Commit 0ac18c1

Browse files
committed
[AMDGPU][SIInsertWaitCnts] Add mixed pending event xcnt test
1 parent 4df30af commit 0ac18c1

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

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

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,51 @@ body: |
11141114
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
11151115
...
11161116

1117+
---
1118+
name: mixed_pending_events
1119+
tracksRegLiveness: true
1120+
machineFunctionInfo:
1121+
isEntryFunction: true
1122+
body: |
1123+
; GCN-LABEL: name: mixed_pending_events
1124+
; GCN: bb.0:
1125+
; GCN-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
1126+
; GCN-NEXT: liveins: $vgpr0_vgpr1, $sgpr0_sgpr1, $scc
1127+
; GCN-NEXT: {{ $}}
1128+
; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
1129+
; GCN-NEXT: S_CBRANCH_SCC1 %bb.2, implicit $scc
1130+
; GCN-NEXT: {{ $}}
1131+
; GCN-NEXT: bb.1:
1132+
; GCN-NEXT: successors: %bb.2(0x80000000)
1133+
; GCN-NEXT: liveins: $vgpr0_vgpr1, $sgpr2
1134+
; GCN-NEXT: {{ $}}
1135+
; GCN-NEXT: $vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
1136+
; GCN-NEXT: $vgpr3 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
1137+
; GCN-NEXT: {{ $}}
1138+
; GCN-NEXT: bb.2:
1139+
; GCN-NEXT: liveins: $sgpr2, $vgpr2
1140+
; GCN-NEXT: {{ $}}
1141+
; GCN-NEXT: S_WAIT_LOADCNT 1
1142+
; GCN-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr2, implicit $exec
1143+
; GCN-NEXT: S_WAIT_KMCNT 0
1144+
; GCN-NEXT: $sgpr2 = S_MOV_B32 $sgpr2
1145+
; GCN-NEXT: S_WAIT_XCNT 0
1146+
; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
1147+
bb.0:
1148+
liveins: $vgpr0_vgpr1, $sgpr0_sgpr1, $scc
1149+
$sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
1150+
S_CBRANCH_SCC1 %bb.2, implicit $scc
1151+
bb.1:
1152+
liveins: $vgpr0_vgpr1, $sgpr2
1153+
$vgpr2 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
1154+
$vgpr3 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, implicit $exec
1155+
bb.2:
1156+
liveins: $sgpr2, $vgpr2
1157+
$vgpr2 = V_MOV_B32_e32 $vgpr2, implicit $exec
1158+
$sgpr2 = S_MOV_B32 $sgpr2
1159+
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
1160+
...
1161+
11171162
---
11181163
name: pending_vmem_event_between_block
11191164
tracksRegLiveness: true

0 commit comments

Comments
 (0)