[llvm] [AMDGPU][VOPD] Limit VOPDPairing from reaching over load dependencies (PR #201930)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 01:52:28 PDT 2026


================
@@ -264,6 +264,24 @@ static bool shouldScheduleVOPDAdjacent(const TargetInstrInfo &TII,
       .has_value();
 }
 
+/// Check whether \p SU has a load dependency that is currently scheduled after
+/// \p Base (according to node number).
+static bool hasIntermediateLoadDependency(const SUnit &SU, const SUnit &Base) {
+  for (const SDep &Dep : SU.Preds) {
----------------
jayfoad wrote:

> Is it worth considering chains of dependencies?

Agreed that this check is pretty crude. You really want to check for SU transitively depending on some load, and some other load transitively depending on Base, and the two loads have a chance of being clustered by the clustering mutation.

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


More information about the llvm-commits mailing list