[llvm] AMDGPU: VALU data fast-forwarding needs no s_delay (PR #205481)
Reem Elkhouly via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 18:09:59 PDT 2026
================
@@ -400,6 +452,16 @@ class AMDGPUInsertDelayAlu {
// ignore this operand.
if (MI.getOpcode() == AMDGPU::V_WRITELANE_B32 && Op.isTied())
continue;
+ // Suppress the delay for VCC operands when both the
+ // producer and consumer are in the hardware fast-forward set.
+ Register Reg = Op.getReg();
+ if (Reg == VccReg && isFastForwardConsumer(MI) &&
----------------
amd-relkhoul wrote:
I see your point.
I’ll rework this to detect forwarding based on the semantic producer/consumer operand roles (e.g. carry-out, compare-mask output, carry-in, condition-mask input) rather than the physical register, so VOP3 arbitrary SGPR mask operands are handled correctly as well.
The plan is to move the logic to operand-level classification/tracking instead of a single instruction-level IsVCCFFProducer flag.
https://github.com/llvm/llvm-project/pull/205481
More information about the llvm-commits
mailing list