[PATCH] D17101: AMDGPU/SI: When splitting SMRD instructions, add its users to VALU worklist
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 14:24:07 PST 2016
tstellarAMD created this revision.
tstellarAMD added reviewers: arsenm, mareko.
tstellarAMD added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.
When we split SMRD instructions into two MUBUFs we were adding the users
of the newly created MUBUFs to the VALU worklist. However, the only
users these instructions had was the REG_SEQUENCE that was inserted
by splitSMRD when the original SMRD instruction was split.
We need to make sure to add the users of the original SMRD to the VALU
worklist before it is split.
I have a test case, but it requires one other bug fix, so it will be
added in a later commt.
http://reviews.llvm.org/D17101
Files:
lib/Target/AMDGPU/SIInstrInfo.cpp
Index: lib/Target/AMDGPU/SIInstrInfo.cpp
===================================================================
--- lib/Target/AMDGPU/SIInstrInfo.cpp
+++ lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2407,6 +2407,7 @@
}
case 32: {
MachineInstr *Lo, *Hi;
+ addUsersToMoveToVALUWorklist(MI->getOperand(0).getReg(), MRI, Worklist);
splitSMRD(MI, &AMDGPU::SReg_128RegClass, AMDGPU::S_LOAD_DWORDX4_IMM,
AMDGPU::S_LOAD_DWORDX4_SGPR, Lo, Hi);
MI->eraseFromParent();
@@ -2417,6 +2418,7 @@
case 64: {
MachineInstr *Lo, *Hi;
+ addUsersToMoveToVALUWorklist(MI->getOperand(0).getReg(), MRI, Worklist);
splitSMRD(MI, &AMDGPU::SReg_256RegClass, AMDGPU::S_LOAD_DWORDX8_IMM,
AMDGPU::S_LOAD_DWORDX8_SGPR, Lo, Hi);
MI->eraseFromParent();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17101.47527.patch
Type: text/x-patch
Size: 812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160210/292fc534/attachment.bin>
More information about the llvm-commits
mailing list