summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
diff options
context:
space:
mode:
authorTim Renouf <tpr.llvm@botech.co.uk>2018-05-27 17:26:11 +0000
committerTim Renouf <tpr.llvm@botech.co.uk>2018-05-27 17:26:11 +0000
commit364edcd2e532a83a25223aeed778bf7a79b9c038 (patch)
tree432fe86918b6bcc2be7d0436cf3622744bf2fe3f /llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
parent3c6595d65dec1df7db1016366ef0c0e34686c1c0 (diff)
downloadbcm5719-llvm-364edcd2e532a83a25223aeed778bf7a79b9c038.tar.gz
bcm5719-llvm-364edcd2e532a83a25223aeed778bf7a79b9c038.zip
[AMDGPU] Fixed WWM bug in block otherwise entirely in WQM
Summary: For a block with WQM on entry and exit and containing no exact mode code, but containing some WWM code, the WQM pass forgot to process the block at all and so did not insert code to enter and leave WWM. This commit fixes that. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D47027 Change-Id: I044792eead1293bed4203fb26ce75f47878afeb6 llvm-svn: 333362
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
index eb99683a28a..4935a914a99 100644
--- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -453,6 +453,11 @@ void SIWholeQuadMode::propagateInstruction(MachineInstr &MI,
if (II.Needs != 0)
markInstructionUses(MI, II.Needs, Worklist);
+
+ // Ensure we process a block containing WWM, even if it does not require any
+ // WQM transitions.
+ if (II.Needs & StateWWM)
+ BI.Needs |= StateWWM;
}
void SIWholeQuadMode::propagateBlock(MachineBasicBlock &MBB,
OpenPOWER on IntegriCloud