[llvm] [AMDGPU]Refactor `lowerWaveReduce` for maintainability (PR #189223)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 05:49:18 PDT 2026
================
@@ -5689,6 +5760,28 @@ static MachineBasicBlock *lowerWaveReduce(MachineInstr &MI,
unsigned Stratergy = static_cast<unsigned>(MI.getOperand(2).getImm());
enum WAVE_REDUCE_STRATEGY : unsigned { DEFAULT = 0, ITERATIVE = 1, DPP = 2 };
MachineBasicBlock *RetBB = nullptr;
+ auto ExtractSubRegs = [&](MachineInstr &MI, MachineOperand &Op,
+ const TargetRegisterClass *SrcRC)
+ -> std::tuple<MachineOperand, MachineOperand> {
----------------
arsenm wrote:
Avoid value Machineoperands. These also probably shouldn't' be lambdas
https://github.com/llvm/llvm-project/pull/189223
More information about the llvm-commits
mailing list