[all-commits] [llvm/llvm-project] b6a667: [ImplicitNullChecks] Preserve debug location on FA...

Akshat Dalal via All-commits all-commits at lists.llvm.org
Thu Jul 9 23:53:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6a66701fae185048c88a04a4584b4f2de01b73a
      https://github.com/llvm/llvm-project/commit/b6a66701fae185048c88a04a4584b4f2de01b73a
  Author: Akshat Dalal <adalal at amd.com>
  Date:   2026-07-10 (Fri, 10 Jul 2026)

  Changed paths:
    M llvm/lib/CodeGen/ImplicitNullChecks.cpp
    A llvm/test/CodeGen/X86/implicit-null-check-debugloc.ll

  Log Message:
  -----------
  [ImplicitNullChecks] Preserve debug location on FAULTING_OP (#205560)

insertFaultingInstr() built the FAULTING_OP with an empty DebugLoc,
dropping the folded memory op's source location. As a result, the
faulting load is mislabeled in the line table, giving wrong source
attribution for the very instruction that traps on a null deref. Fix by
using MI->getDebugLoc().

The original report also flagged dropped MIFlags and def renamable/
sub-register/early-clobber bits, but those are not observable:
Unpredictable is never set on loads, the register bits are never read
(FAULTING_OP is opaque until AsmPrinter), and the sub-register write is
already modeled correctly. Only the debug location is fixed here.



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