[llvm] 68901fd - [AMDGPU] Consider S_SETPRIO a scheduling boundary
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 11:50:39 PDT 2022
Author: Stanislav Mekhanoshin
Date: 2022-07-27T11:50:23-07:00
New Revision: 68901fdbebb73617067cbab9888364ba9f8a2843
URL: https://github.com/llvm/llvm-project/commit/68901fdbebb73617067cbab9888364ba9f8a2843
DIFF: https://github.com/llvm/llvm-project/commit/68901fdbebb73617067cbab9888364ba9f8a2843.diff
LOG: [AMDGPU] Consider S_SETPRIO a scheduling boundary
The instruction is used to modify wave priority with the intent
to affect VALU execution and currently we can reschedule VALU
around it since that VALU does not have side effects.
Differential Revision: https://reviews.llvm.org/D130654
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/sched-setprio.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 8916f06598c6d..3eaac39cd7165 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -3489,6 +3489,7 @@ bool SIInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
return MI.modifiesRegister(AMDGPU::EXEC, &RI) ||
MI.getOpcode() == AMDGPU::S_SETREG_IMM32_B32 ||
MI.getOpcode() == AMDGPU::S_SETREG_B32 ||
+ MI.getOpcode() == AMDGPU::S_SETPRIO ||
changesVGPRIndexingMode(MI);
}
diff --git a/llvm/test/CodeGen/AMDGPU/sched-setprio.ll b/llvm/test/CodeGen/AMDGPU/sched-setprio.ll
index 06885dc28edad..bf60e071679cc 100644
--- a/llvm/test/CodeGen/AMDGPU/sched-setprio.ll
+++ b/llvm/test/CodeGen/AMDGPU/sched-setprio.ll
@@ -3,13 +3,11 @@
declare void @llvm.amdgcn.s.setprio(i16)
declare <4 x float> @llvm.amdgcn.mfma.f32.4x4x1f32(float, float, <4 x float>, i32, i32, i32)
-; FIXME: setprio shall surround mfma instructions
-
; GCN-LABEL: {{^}}test_mfma_f32_4x4x1f32:
; GCN: s_setprio 1
-; GCN: s_setprio 0
; GCN: v_mfma
; GCN: v_mfma
+; GCN: s_setprio 0
define amdgpu_kernel void @test_mfma_f32_4x4x1f32(<4 x float> addrspace(1)* %arg) #0 {
bb:
%in.1 = load <4 x float>, <4 x float> addrspace(1)* %arg
More information about the llvm-commits
mailing list