[llvm] [AMDGPU] Don't cluster lds instrs together (PR #180908)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 15 07:07:24 PST 2026


================
@@ -563,12 +563,24 @@ static bool memOpsHaveSameBasePtr(const MachineInstr &MI1,
   return Base1 == Base2;
 }
 
+static bool isDSInstrOperands(ArrayRef<const MachineOperand *> operands) {
+  if (operands.empty()) {
+    return false;
+  }
+  const auto *MI = operands.front()->getParent();
+  return SIInstrInfo::isDS(*MI);
+}
----------------
shiltian wrote:

```suggestion
static bool isDSInstrOperands(ArrayRef<const MachineOperand *> Operands) {
  if (Operands.empty())
    return false;
  const auto *MI = operands.front()->getParent();
  return SIInstrInfo::isDS(*MI);
}
```

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


More information about the llvm-commits mailing list