[llvm] [AMDGPU] misched: avoid subregister dependencies (PR #140255)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 08:51:30 PDT 2025


================
@@ -535,6 +535,62 @@ unsigned GCNSubtarget::getMaxNumVGPRs(const MachineFunction &MF) const {
   return getBaseMaxNumVGPRs(F, MFI.getWavesPerEU());
 }
 
+bool GCNSubtarget::isRealSchedDependency(MachineInstr *DefI, int DefOpIdx,
+                                         MachineInstr *UseI,
+                                         int UseOpIdx) const {
+  if (!InstrInfo.isVOP3P(*UseI))
+    return true;
+  MachineOperand &DefOp = DefI->getOperand(DefOpIdx);
+  if (!DefOp.isReg() || !DefOp.getReg().isPhysical())
+    return true;
----------------
arsenm wrote:

Don't understand the isPhysical check. Why would this only apply during post ra scheduling?

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


More information about the llvm-commits mailing list