forked from OSchip/llvm-project
[amdgpu] Fix scoreboard updating on `s_waitcnt_vscnt`.
Summary: - Other counters are accidentally cleared. Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71866
This commit is contained in:
parent
8be5a0fe12
commit
79d401905f
|
@ -1081,7 +1081,7 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(
|
|||
assert(II->getOpcode() == AMDGPU::S_WAITCNT_VSCNT);
|
||||
assert(II->getOperand(0).getReg() == AMDGPU::SGPR_NULL);
|
||||
ScoreBrackets.applyWaitcnt(
|
||||
AMDGPU::Waitcnt(0, 0, 0, II->getOperand(1).getImm()));
|
||||
AMDGPU::Waitcnt(~0u, ~0u, ~0u, II->getOperand(1).getImm()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX10 %s
|
||||
|
||||
# GFX10-LABEL: waitcnt-vscnt
|
||||
# GFX10: GLOBAL_ATOMIC_ADD_RTN
|
||||
# GFX10-NEXT: S_WAITCNT 49279
|
||||
---
|
||||
name: waitcnt-vscnt
|
||||
machineFunctionInfo:
|
||||
isEntryFunction: true
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0_sgpr1
|
||||
$sgpr4 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 4, 0, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`)
|
||||
S_WAITCNT_VSCNT undef $sgpr_null, 0
|
||||
$vgpr0 = GLOBAL_ATOMIC_ADD_RTN $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec :: (load store syncscope("agent") seq_cst 4, addrspace 1)
|
||||
S_CMP_LG_U32 killed $sgpr4, 0, implicit-def $scc
|
||||
...
|
Loading…
Reference in New Issue