[llvm] Merge debug locations when combining stores (PR #225358)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 03:30:22 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: anatasluo (anatasluo)

<details>
<summary>Changes</summary>

Constant and extracted-vector-element store merging currently inherits only the first store's location. For stores from different inline instances, this can attribute the whole memory access to the wrong inline frame.

Merge the locations of the stores actually combined, using the existing DebugLoc policy while preserving SDLoc's IR order. Add regression coverage for sibling scopes, identical and missing locations, and partially merged candidate groups.

Assisted-by: OpenAI Codex

---
Full diff: https://github.com/llvm/llvm-project/pull/225358.diff


3 Files Affected:

- (modified) llvm/include/llvm/CodeGen/SelectionDAGNodes.h (+5) 
- (modified) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (+2-1) 
- (added) llvm/test/DebugInfo/X86/sdag-merge-stores-debugloc.ll (+80) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/225358


More information about the llvm-commits mailing list