forked from OSchip/llvm-project
parent
ff1bd20ded
commit
437fd71f5b
|
@ -314,20 +314,16 @@ bool SIInstrInfo::shouldClusterMemOps(MachineInstr &FirstLdSt,
|
|||
const MachineOperand *FirstDst = nullptr;
|
||||
const MachineOperand *SecondDst = nullptr;
|
||||
|
||||
if (isDS(FirstLdSt) && isDS(SecondLdSt)) {
|
||||
FirstDst = getNamedOperand(FirstLdSt, AMDGPU::OpName::vdst);
|
||||
SecondDst = getNamedOperand(SecondLdSt, AMDGPU::OpName::vdst);
|
||||
}
|
||||
|
||||
if (isSMRD(FirstLdSt) && isSMRD(SecondLdSt)) {
|
||||
FirstDst = getNamedOperand(FirstLdSt, AMDGPU::OpName::sdst);
|
||||
SecondDst = getNamedOperand(SecondLdSt, AMDGPU::OpName::sdst);
|
||||
}
|
||||
|
||||
if ((isMUBUF(FirstLdSt) && isMUBUF(SecondLdSt)) ||
|
||||
(isMTBUF(FirstLdSt) && isMTBUF(SecondLdSt))) {
|
||||
FirstDst = getNamedOperand(FirstLdSt, AMDGPU::OpName::vdata);
|
||||
SecondDst = getNamedOperand(SecondLdSt, AMDGPU::OpName::vdata);
|
||||
} else if (isSMRD(FirstLdSt) && isSMRD(SecondLdSt)) {
|
||||
FirstDst = getNamedOperand(FirstLdSt, AMDGPU::OpName::sdst);
|
||||
SecondDst = getNamedOperand(SecondLdSt, AMDGPU::OpName::sdst);
|
||||
} else if (isDS(FirstLdSt) && isDS(SecondLdSt)) {
|
||||
FirstDst = getNamedOperand(FirstLdSt, AMDGPU::OpName::vdst);
|
||||
SecondDst = getNamedOperand(SecondLdSt, AMDGPU::OpName::vdst);
|
||||
}
|
||||
|
||||
if (!FirstDst || !SecondDst)
|
||||
|
|
Loading…
Reference in New Issue