[llvm] [AMDGPU] RewriteMFMAFormStage: pre-check dst/src2 eligibility in initHeuristics() (PR #199825)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 08:14:34 PDT 2026
================
@@ -2307,10 +2307,18 @@ bool RewriteMFMAFormStage::initHeuristics(
int ReplacementOp = AMDGPU::getMFMASrcCVDstAGPROp(MI.getOpcode());
assert(ReplacementOp != -1);
+ MachineOperand *Src2 = TII->getNamedOperand(MI, AMDGPU::OpName::src2);
+ MachineOperand &Dst = MI.getOperand(0);
+ assert(Src2);
----------------
shiltian wrote:
No need for assert here. It should never fail.
https://github.com/llvm/llvm-project/pull/199825
More information about the llvm-commits
mailing list