[all-commits] [llvm/llvm-project] c09338: [SelectionDAG] Fix crash for salvaging with indire...

David Stenberg via All-commits all-commits at lists.llvm.org
Sat Nov 18 08:01:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c093383ffadff8dfadfd6bc0ab7107a0e194aa7e
      https://github.com/llvm/llvm-project/commit/c093383ffadff8dfadfd6bc0ab7107a0e194aa7e
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2023-11-18 (Sat, 18 Nov 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    A llvm/test/DebugInfo/X86/salvage-add-node-indirect.ll

  Log Message:
  -----------
  [SelectionDAG] Fix crash for salvaging with indirect debug values (#72645)

This is a follow-up to #68981, and fix for #72630, #72447.

We may end up in SelectionDAG::salvageDebugInfo() with indirect debug
values, and attempting to salvage ADD nodes with non-constant RHS would
lead us to try to turn those indirect debug values variadic, which is
not allowed.

This triggered the following assert in the SDDbgValue constructor:

  Assertion `!(IsVariadic && IsIndirect)' failed.

This also adds a lit test for salvaging when having an indirect debug
value and constant RHS, as there seems like there was no such lit test.
However, I am not sure if the use of the stack_value operation is
correct in that case (which is existing behavior before #68981), but
that at least documents the current behavior.




More information about the All-commits mailing list