[llvm] [AMDGPU] Merge consecutive wait_alu instruction (PR #128916)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 09:52:56 PST 2025
================
@@ -362,6 +377,13 @@ class AMDGPUWaitSGPRHazards {
Mask = AMDGPU::DepCtr::encodeFieldVaSdst(Mask, 0);
}
if (Emit) {
+ if (MI != MI->getParent()->begin()) {
+ MachineInstr &PrevMI = *std::prev(MI);
+ if (PrevMI.getOpcode() == AMDGPU::S_WAITCNT_DEPCTR) {
----------------
shiltian wrote:
do we also want to check s_wait_alu here? They are aliases.
https://github.com/llvm/llvm-project/pull/128916
More information about the llvm-commits
mailing list