[PATCH] D156679: [WIP][AMDGPU][SIInsertWaitcnts] Do not add s_waitcnt when the counters are known to be 0 already
Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 02:44:41 PDT 2023
jmmartinez added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:8291-8293
+ // FIXME: move to the right place
+ if (auto NonSoftOpcode = SIInstrInfo::getNonSoftWaitcntOpcode(Opcode))
+ Opcode = *NonSoftOpcode;
----------------
arsenm wrote:
> This should use PseudoInstExpansion (which we apparently only have 2 uses of, I thought there were more)
I'm not sure how to do this.
I've tried with the following, but it seems that result cannot be another pseudo:
```
SOPInstructions.td:1281:5: error: In pseudo instruction 'S_WAITCNT_soft', result operator 'S_WAITCNT' cannot be a pseudo instruction
def S_WAITCNT_soft : SOPP_Pseudo <"s_soft_waitcnt" , (ins SWaitCnt:$simm16), "$simm16">,
PseudoInstExpansion<(S_WAITCNT SWaitCnt:$simm16)>;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156679/new/
https://reviews.llvm.org/D156679
More information about the llvm-commits
mailing list