[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:04:13 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() &&
+ !DefI->getOperand(DefOpIdx).isImplicit()) {
+ const MachineOperand *GDS =
+ InstrInfo.getNamedOperand(*DefI, AMDGPU::OpName::gds);
+ if (!GDS || !GDS->getImm())
----------------
lialan wrote:
on the second thought, again it is unrelated as well. it was only related to the problem.
https://github.com/llvm/llvm-project/pull/229538
More information about the llvm-commits
mailing list