diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2016-02-19 15:33:13 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2016-02-19 15:33:13 +0000 |
commit | 2d26fe7aa639e9aa84097bf5aadc83dd4a780e35 (patch) | |
tree | f36b3773186fbe534ff9aeae93e5e82c40a3122a /llvm/lib/Target/AMDGPU/SIInsertWaits.cpp | |
parent | 9630a4ab15b4ece614d18f20e30bd65d8cf2d262 (diff) | |
download | bcm5719-llvm-2d26fe7aa639e9aa84097bf5aadc83dd4a780e35.tar.gz bcm5719-llvm-2d26fe7aa639e9aa84097bf5aadc83dd4a780e35.zip |
AMDGPU/SI: Fix s_waitcnt insertion for flat instructions
Summary:
This was broken in r260694 which swapped the address and data operands
for flat store instructions. The code in SIInsertWaits assumes
that the data operand always comes before the address operand, so
we need to add a special case for flat.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D17366
llvm-svn: 261330
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIInsertWaits.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIInsertWaits.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp index 522233f88c7..03bebae729e 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp +++ b/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp @@ -231,15 +231,17 @@ bool SIInsertWaits::isOpRelevant(MachineOperand &Op) { return false; // Check if this operand is the value being stored. - // Special case for DS instructions, since the address + // Special case for DS/FLAT instructions, since the address // operand comes before the value operand and it may have // multiple data operands. - if (TII->isDS(MI)) { + if (TII->isDS(MI) || TII->isFLAT(MI)) { MachineOperand *Data = TII->getNamedOperand(MI, AMDGPU::OpName::data); if (Data && Op.isIdenticalTo(*Data)) return true; + } + if (TII->isDS(MI)) { MachineOperand *Data0 = TII->getNamedOperand(MI, AMDGPU::OpName::data0); if (Data0 && Op.isIdenticalTo(*Data0)) return true; |