[clang] [llvm] [Mips] Implement MipsInstrInfo::getNop() operation (PR #135524)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Sun May 11 01:05:15 PDT 2025


================
@@ -87,6 +87,14 @@ MipsInstrInfo::GetMemOperand(MachineBasicBlock &MBB, int FI,
                                  MFI.getObjectAlign(FI));
 }
 
+MCInst MipsInstrInfo::getNop() const {
+  MCInst Nop;
+  // using Mips::NOP gives
+  // "fatal error: error in backend: Not supported instr: <MCInst 580>"
----------------
wzssyqa wrote:

I guess the reason is that NOP is defined as PseudoSE

  /// No operation.
  def NOP : PseudoSE<(outs), (ins), []>,
                     PseudoInstExpansion<(SLL ZERO, ZERO, 0)>, ISA_MIPS1;

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


More information about the llvm-commits mailing list