[all-commits] [llvm/llvm-project] 7544b0: [LiveDebugValues] Do not join debug values whose o...

Teja Alaghari via All-commits all-commits at lists.llvm.org
Fri Sep 11 00:05:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7544b08a04ce084bf34bd3f4f1e8fb6f4d3aa2e4
      https://github.com/llvm/llvm-project/commit/7544b08a04ce084bf34bd3f4f1e8fb6f4d3aa2e4
  Author: Teja Alaghari <teja.alaghari at amd.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
    A llvm/test/DebugInfo/MIR/InstrRef/expr-operand-count-mismatch.mir

  Log Message:
  -----------
  [LiveDebugValues] Do not join debug values whose operand counts disagree (#221929)

Currently, `DbgValueProperties::isJoinable()` decides whether two values
could be joined by comparing their `DIExpressions` only. That was safe
when location-operand count was taken from the expression. In
instruction-referencing `LiveDebugValues`, `NumLocOps` is taken from the
`MachineInstr` (`getNumDebugOperands()`), so two values can share an
expression and still differ in operand count.

Joining pairs location operands by index. When the counts disagreed,
`pickVPHILoc` indexed past the shorter list and hit `assert(Index <
OpCount)` in `DbgValue::getDbgOpID`.

This change makes `isJoinable()` return `false` unless `NumLocOps`
**also agrees**.



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