[llvm] [AMDGPU] Tweak sched model latencies for VALU fast-forward cases (PR #198475)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 03:18:27 PDT 2026
================
@@ -830,6 +830,22 @@ void GCNSubtarget::adjustSchedDependency(
Dep.setLatency(InstrInfo.getSchedModel().computeOperandLatency(
DefI, DefOpIdx, UseI, UseOpIdx));
}
+
+ // Handle "fast-forward" cases for VALU dependencies via a lanemask-like SGPR:
+ // V_CMP* -> V_CNDMASK_B32
+ // V_ADD/SUB with carryout -> V_ADD/SUB with carryin (on GFX10+)
+ switch (UseI->getOpcode()) {
+ case AMDGPU::V_ADDC_U32_e64:
----------------
jayfoad wrote:
There are also _dpp and _sdwa forms, but I'm not sure it's really worth handling those too? It is a pain to list them all and the returns would be diminishing. Is there some simple way to query the "base" form of an opcode independent of encoding?
https://github.com/llvm/llvm-project/pull/198475
More information about the llvm-commits
mailing list