[llvm] [AMDGPU] DPP implementations for Wave Reduction (PR #185814)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 03:08:31 PDT 2026
================
@@ -5649,6 +5675,10 @@ static MachineBasicBlock *lowerWaveReduce(MachineInstr &MI,
Register SrcReg = MI.getOperand(1).getReg();
bool isSGPR = TRI->isSGPRClass(MRI.getRegClass(SrcReg));
Register DstReg = MI.getOperand(0).getReg();
+ assert(MI.getOperand(2).isImm() &&
+ "Stratergy argument for wave reduction must be a constant.");
----------------
easyonaadit wrote:
> This is also a redundant assert, getImm will also assert
getImm would just give a generic assert. I wanted something more specific.
> also don't assert things that the verifier should catch
But yes, I'll remove it.
https://github.com/llvm/llvm-project/pull/185814
More information about the llvm-commits
mailing list