[llvm] [AMDGPU] Work around gfx1250 VOPD3 FP64 OPY hazard (PR #224741)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 20:13:23 PDT 2026
================
@@ -105,6 +105,46 @@ static bool canMapVOP3PToVOPD(const MachineInstr &MI) {
getNamedOp(MI, AMDGPU::OpName::src2).getReg();
}
+// In a VOPD3 whose OPX is a 64-bit operation an OPY VGPR source operand reads
+// back the wrong value if it names the last VGPR the wave owns.
+//
+// The number of VGPRs a wave owns is always a whole number of allocation
+// granules, so the last VGPR it owns is always the one just below a granule
+// boundary. A source which is not there cannot be it, whatever the wave's VGPR
+// count turns out to be. That count is deliberately not consulted: it is only
+// known once the whole call graph has been seen, at emission time.
----------------
shiltian wrote:
emission time?
https://github.com/llvm/llvm-project/pull/224741
More information about the llvm-commits
mailing list