[all-commits] [llvm/llvm-project] 792670: [X86][WinEH] Insert nop after unwinding inline ass...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jan 19 00:09:26 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 792670a4003cba8636713916bed89a0b991fb32d
      https://github.com/llvm/llvm-project/commit/792670a4003cba8636713916bed89a0b991fb32d
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M llvm/include/llvm/CodeGen/AsmPrinter.h
    M llvm/include/llvm/IR/InlineAsm.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
    M llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
    M llvm/lib/CodeGen/MachineInstr.cpp
    M llvm/lib/CodeGen/MachineVerifier.cpp
    M llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/Target/ARM/ARMAsmPrinter.cpp
    M llvm/lib/Target/ARM/ARMAsmPrinter.h
    M llvm/lib/Target/Mips/MipsAsmPrinter.cpp
    M llvm/lib/Target/Mips/MipsAsmPrinter.h
    M llvm/lib/Target/X86/X86AsmPrinter.h
    M llvm/lib/Target/X86/X86MCInstLower.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-unwind-inline-asm.ll
    M llvm/test/CodeGen/X86/seh-unwind-inline-asm-codegen.ll

  Log Message:
  -----------
  [X86][WinEH] Insert nop after unwinding inline assembly (#176393)

As discussed on https://github.com/llvm/llvm-project/pull/144745, insert
a nop after unwinding inline assembly, as it may end on a call.

While the change itself is trivial, I ended up having to do two
infrastructure changes:
* The unwind flag needs to be propagated to ExtraInfo of the
MachineInstr.
* The MachineInstr needs to be passed through to emitInlineAsmEnd(), and
the method needs to be non-const.

Fixes https://github.com/llvm/llvm-project/issues/157073.



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