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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 01:11:11 PST 2025


================
@@ -476,7 +542,8 @@ MachineInstr *SDWADstOperand::potentialToConvert(const SIInstrInfo *TII,
       return nullptr;
   }
 
-  return PotentialMO->getParent();
+  auto parent = PotentialMO->getParent();
+  return canCombineSelections(*parent, TII) ? parent : nullptr;
----------------
arsenm wrote:

```suggestion
  MachineInstr *Parent = PotentialMO->getParent();
  return canCombineSelections(*Parent, TII) ? Parent : nullptr;
```

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


More information about the llvm-commits mailing list