File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -614,11 +614,13 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
614614 }
615615
616616 static bool isLDSDMA (const MachineInstr &MI) {
617- return isVALU (MI) && (isMUBUF (MI) || isFLAT (MI));
617+ return (isVALU (MI) && (isMUBUF (MI) || isFLAT (MI))) ||
618+ (MI.getDesc ().TSFlags & SIInstrFlags::TENSOR_CNT);
618619 }
619620
620621 bool isLDSDMA (uint16_t Opcode) {
621- return isVALU (Opcode) && (isMUBUF (Opcode) || isFLAT (Opcode));
622+ return (isVALU (Opcode) && (isMUBUF (Opcode) || isFLAT (Opcode))) ||
623+ (get (Opcode).TSFlags & SIInstrFlags::TENSOR_CNT);
622624 }
623625
624626 static bool isGWS (const MachineInstr &MI) {
@@ -815,7 +817,11 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
815817 }
816818
817819 static bool mayWriteLDSThroughDMA (const MachineInstr &MI) {
818- return isLDSDMA (MI) && MI.getOpcode () != AMDGPU::BUFFER_STORE_LDS_DWORD;
820+ unsigned Opc = MI.getOpcode ();
821+ // Exclude instructions that read FROM LDS (not write to it)
822+ return isLDSDMA (MI) && Opc != AMDGPU::BUFFER_STORE_LDS_DWORD &&
823+ Opc != AMDGPU::TENSOR_STORE_FROM_LDS &&
824+ Opc != AMDGPU::TENSOR_STORE_FROM_LDS_D2;
819825 }
820826
821827 static bool isSBarrierSCCWrite (unsigned Opcode) {
You can’t perform that action at this time.
0 commit comments