[llvm] [AMDGPU] Fix DS result latency for inline asm (PR #229538)

Alan Li via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 15:00:53 PDT 2026


================
@@ -850,6 +850,19 @@ void GCNSubtarget::adjustSchedDependency(
     return; // This is not a data dependency anymore.
   }
 
+  // Inline asm's variable explicit inputs are classified as pseudo uses by
+  // the generic physical-register DAG builder and receive zero latency.
+  // Restore the modeled DS result latency for explicit inline-asm inputs.
+  if (UseI->getOpcode() == TargetOpcode::INLINEASM && InstrInfo.isDS(*DefI) &&
+      DefI->mayLoad() && !UseI->getOperand(UseOpIdx).isImplicit() &&
----------------
lialan wrote:

True! this is not limited to DS (only the problem was related to DS).

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


More information about the llvm-commits mailing list