[llvm] [Mips] Fix getInstSizeInBytes for instructions with delay slots (PR #216665)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 02:49:57 PDT 2026


================
@@ -708,6 +708,10 @@ bool MipsInstrInfo::isAsCheapAsAMove(const MachineInstr &MI) const {
 unsigned MipsInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
   switch (MI.getOpcode()) {
   default:
+    if (MI.hasDelaySlot()) {
+      // instr + 1 nop
+      return 8;
----------------
yingopq wrote:

Applied.

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


More information about the llvm-commits mailing list