[llvm] unpack packed instructions overlapped by MFMAs post-RA scheduling (PR #157968)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 20:05:33 PDT 2025
================
@@ -483,5 +799,29 @@ bool SIPreEmitPeephole::run(MachineFunction &MF) {
}
}
+ // TODO: Fold this into previous block, if possible. Evaluate and handle any
+ // side effects.
+ for (MachineBasicBlock &MBB : MF) {
+ // Unpack packed instructions overlapped by MFMAs. This allows the compiler
+ // to co-issue unpacked instructions with MFMA
+ uint16_t NumMFMACycles = 0;
+ auto SchedModel = TII->getSchedModel();
+ SetVector<MachineInstr *> InstrsToUnpack;
+ for (auto &MI : make_early_inc_range(MBB.instrs())) {
+ if (SIInstrInfo::isMFMA(MI)) {
----------------
jrbyrnes wrote:
```
if (!SIInstrInfo::isMFMA(MI))
continue;
```
To reduce nesting.
https://github.com/llvm/llvm-project/pull/157968
More information about the llvm-commits
mailing list