[llvm] AMDGPU: Scratch instructions are trivially disjoint from SMEM and buffer instructions (PR #65287)
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 15:13:28 PDT 2023
================
@@ -3425,19 +3425,30 @@ bool SIInstrInfo::areMemAccessesTriviallyDisjoint(const MachineInstr &MIa,
if (isMUBUF(MIb) || isMTBUF(MIb))
return checkInstOffsetsDoNotOverlap(MIa, MIb);
- return !isFLAT(MIb) && !isSMRD(MIb);
+ if (isFLAT(MIb))
+ return isFLATScratch(MIb);
+
+ return !isSMRD(MIb);
}
if (isSMRD(MIa)) {
if (isSMRD(MIb))
return checkInstOffsetsDoNotOverlap(MIa, MIb);
- return !isFLAT(MIb) && !isMUBUF(MIb) && !isMTBUF(MIb);
+ if (isFLAT(MIb))
+ return isFLATScratch(MIb);
----------------
nhaehnle wrote:
The function returns true if the instructions are trivially disjoint. SMRD is trivially disjoint from FLAT if it's FLAT-scratch, but not otherwise.
https://github.com/llvm/llvm-project/pull/65287
More information about the llvm-commits
mailing list