]> granicus.if.org Git - llvm/commit
[DebugInfo] LiveDebugValues: correctly discriminate kinds of variable locations
authorJeremy Morse <jeremy.morse.llvm@gmail.com>
Thu, 29 Aug 2019 11:20:54 +0000 (11:20 +0000)
committerJeremy Morse <jeremy.morse.llvm@gmail.com>
Thu, 29 Aug 2019 11:20:54 +0000 (11:20 +0000)
commit9df035808c84d092b4c7d9167e3e5a07b8ecee4d
treea093b3f87cbcbe5ae38d02c96a93753a950c5ded
parentb915666de3df18bd4b9aa887629a2fafafa3e14f
[DebugInfo] LiveDebugValues: correctly discriminate kinds of variable locations

The missing line added by this patch ensures that only spilt variable
locations are candidates for being restored from the stack. Otherwise,
register or constant-value information can be interpreted as a spill
location, through a union.

The added regression test replicates a scenario where this occurs: the
stack load from [rsp] causes the register-location DBG_VALUE to be
"restored" to rsi, when it should be left alone. See PR43058 for details.

Un x-fail a test that was suffering from this from a previous patch.

Differential Revision: https://reviews.llvm.org/D66895

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370334 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveDebugValues.cpp
test/CodeGen/ARM/debug-info-blocks.ll
test/DebugInfo/MIR/X86/live-debug-values-restore-collide.mir [new file with mode: 0644]