[all-commits] [llvm/llvm-project] 6bc513: [DebugInfo] Truncate implicit value constants to s...

firmiana402 via All-commits all-commits at lists.llvm.org
Fri Jul 3 07:57:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bc513523c7069ee7449a0025b6d1d7f06a44d63
      https://github.com/llvm/llvm-project/commit/6bc513523c7069ee7449a0025b6d1d7f06a44d63
  Author: firmiana402 <firmiana402 at gmail.com>
  Date:   2026-07-03 (Fri, 03 Jul 2026)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    A llvm/test/DebugInfo/X86/implicit-value-truncated-integer.ll

  Log Message:
  -----------
  [DebugInfo] Truncate implicit value constants to source type width (#206671)

This is a follow-up to #204353.

mikaelholmen and bevin-hansson reported that the previous change could
assert downstream when emitting `DW_OP_implicit_value` for a source
integer type wider than the target generic DWARF stack type, if the
debug-value carrier integer contains bits outside the declared source
type width.

The fix is to construct the source-width `APInt` with explicit
truncation enabled before emitting the implicit value bytes. This
preserves the intended wrap/truncate behavior and avoids asserting on
otherwise recoverable debug-value input.

A regression test is added for an `unsigned _BitInt(48)` debug value on
i386, covering both an out-of-range positive carrier value and an
all-ones negative carrier value.



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