[llvm] [AMDGPU] Fix SDWA selection combining (PR #218512)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 01:48:51 PDT 2026


================
@@ -309,24 +309,27 @@ static MachineOperand *findSingleRegDef(const MachineOperand *Reg,
   return MRI->getOneDef(Reg->getReg());
 }
 
-/// Combine an SDWA instruction's existing SDWA selection \p Sel with
+/// Combine an SDWA instruction's existing source selection \p Sel with
 /// the SDWA selection \p OperandSel of its operand. If the selections
 /// are compatible, return the combined selection, otherwise return a
-/// nullopt.
+/// nullopt. Destination selections are never composed, see
+/// SDWADstOperand::canCombineSelections.
----------------
aobolensk wrote:

added more details in the comment

https://github.com/llvm/llvm-project/pull/218512


More information about the llvm-commits mailing list