[all-commits] [llvm/llvm-project] 071b86: [Mips] Did not put fake_use into delay slot (#201537)

yingopq via All-commits all-commits at lists.llvm.org
Wed Jul 15 19:19:48 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 071b86797f62e827bf18e83667b0d1875a5ee446
      https://github.com/llvm/llvm-project/commit/071b86797f62e827bf18e83667b0d1875a5ee446
  Author: yingopq <115543042+yingopq at users.noreply.github.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
    A llvm/test/CodeGen/Mips/fake-use.ll

  Log Message:
  -----------
  [Mips] Did not put fake_use into delay slot (#201537)

When compiling with -fextend-variable-liveness, the compiler generates FAKE_USE instructions that are not handled by the Mips assembly printer. This causes a fatal error: "Unsupported instruction : <MCInst 44 >" when using clang with -target mipsel-gnu-linux -Og.

The issue occurs because MipsDelaySlotFiller attempts to process FAKE_USE instructions (which are meta instructions) when searching for instructions to fill delay slots, eventually leading to the assembly printer trying to emit an unsupported instruction.

This patch fixes the crash by treating meta instructions (including FAKE_USE) the same way as debug instructions in the delay slot filler's searchRange function. Meta instructions should be skipped during delay slot filling.

Specifically, the fix:
1.Moves the terminateSearch check before debug/meta instruction checks to ensure proper search termination.
2.Adds isMetaInstruction() check alongside existing isDebugInstr() and isJumpTableDebugInfo() checks.

Fix #198835.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list