[DebugInfo] Prevent invalid fragments at ISel from dropping debug info
authorstozer <stephen.tozer@sony.com>
Tue, 10 Dec 2019 14:33:17 +0000 (14:33 +0000)
committerstozer <stephen.tozer@sony.com>
Thu, 12 Dec 2019 12:28:39 +0000 (12:28 +0000)
commite39e2b4a79c6645a85f0aee5b1e9e6d5d917033a
treeefd75748705ce35df5dae40eaa214823347dbecc
parentf70f18014854a333ce27504515bb8aab7c73c6c2
[DebugInfo] Prevent invalid fragments at ISel from dropping debug info

During SelectionDAG, if a value which is associated with a DBG_VALUE
needs to be split across multiple registers, the DBG_VALUE will be split
into a set of fragment expressions to recreate the original value.

If one or more of these fragments cannot be created, they would
previously be silently dropped, causing the old debug value to live past
its expiry date. This patch fixes this issue by keeping invalid
fragments while setting their value as Undef.

Differential revision: https://reviews.llvm.org/D70248
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/ARM/debuginfo-split-carryexpr.ll [new file with mode: 0644]