mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
AMDGPU: Fix SMEM WAR hazard for gfx10 readlane
Summary: Hazard recognizer fails to see hazard with V_READLANE_B32_gfx10. Reviewers: rampitec Reviewed By: rampitec Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69172 llvm-svn: 375265
This commit is contained in:
parent
227838e7cc
commit
c608812ce8
@ -952,6 +952,7 @@ bool GCNHazardRecognizer::fixSMEMtoVectorWriteHazards(MachineInstr *MI) {
|
||||
unsigned SDSTName;
|
||||
switch (MI->getOpcode()) {
|
||||
case AMDGPU::V_READLANE_B32:
|
||||
case AMDGPU::V_READLANE_B32_gfx10:
|
||||
case AMDGPU::V_READFIRSTLANE_B32:
|
||||
SDSTName = AMDGPU::OpName::vdst;
|
||||
break;
|
||||
|
@ -304,6 +304,21 @@ body: |
|
||||
S_ENDPGM 0
|
||||
...
|
||||
|
||||
# Workaround since spilling/restoring SGPRs use real opcodes.
|
||||
# GCN-LABEL: name: hazard_smem_war_readlane_gfx10
|
||||
# GCN: S_LOAD_DWORD_IMM
|
||||
# GCN: $sgpr_null = S_MOV_B32 0
|
||||
# GCN-NEXT: V_READLANE_B32_gfx10
|
||||
---
|
||||
name: hazard_smem_war_readlane_gfx10
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $sgpr0, $sgpr1, $sgpr3, $vgpr0
|
||||
$sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0, 0
|
||||
$sgpr0 = V_READLANE_B32_gfx10 $vgpr0, $sgpr3
|
||||
S_ENDPGM 0
|
||||
...
|
||||
|
||||
# GCN-LABEL: name: hazard_smem_war_readfirstlane
|
||||
# GCN: S_LOAD_DWORD_IMM
|
||||
# GCN: $sgpr_null = S_MOV_B32 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user