[llvm] [AMDGPU] Account for existing SDWA selections (PR #123221)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 23:00:48 PST 2025


================
@@ -88,6 +88,42 @@ class SIPeepholeSDWALegacy : public MachineFunctionPass {
 
 using namespace AMDGPU::SDWA;
 
+/// Check that the SDWA selections \p Sel and \p OperandSel
+/// are suitable for being combined by combineSdwaSel.
+bool compatibleSelections(SdwaSel Sel, SdwaSel OperandSel) {
----------------
arsenm wrote:

This logic is the same as combineSdwaSel? You can just use combineSdwaSel with a failure return value without restating it differently 

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


More information about the llvm-commits mailing list