summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2018-03-19 22:58:50 +0000
committerAaron Smith <aaron.smith@microsoft.com>2018-03-19 22:58:50 +0000
commit6738960588d4c2cf5dea5d9d5fed52935e732446 (patch)
tree39ab15257b530a8388ca38a71f9bca37d4eca9d8 /llvm/lib/CodeGen/SelectionDAG
parent695b211ce6430348c4b24c2921fe31a6075190b8 (diff)
downloadbcm5719-llvm-6738960588d4c2cf5dea5d9d5fed52935e732446.tar.gz
bcm5719-llvm-6738960588d4c2cf5dea5d9d5fed52935e732446.zip
[SelectionDAG] Transfer DbgValues when integer operations are promoted
Summary: DbgValue nodes were not transferred when integer DAG nodes were promoted. For example, if an i32 add node was promoted to an i64 add node by DAGTypeLegalizer::PromoteIntegerResult(), its DbgValue node was not transferred to the new node. The simple fix is to update SetPromotedInteger() to transfer DbgValues. Add AArch64/dbg-value-i8.ll to test this change and fix ARM/debug-info-d16-reg.ll which had the wrong DILocalVariable nodes with arg numbers even though they are not for function parameters. Patch by Se Jong Oh! Reviewers: vsk, JDevlieghere, aprantl Reviewed By: JDevlieghere Subscribers: javed.absar, kristof.beyls, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D44546 llvm-svn: 327919
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
index 4438ee7878b..595d6891f53 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -776,6 +776,8 @@ void DAGTypeLegalizer::SetPromotedInteger(SDValue Op, SDValue Result) {
SDValue &OpEntry = PromotedIntegers[Op];
assert(!OpEntry.getNode() && "Node is already promoted!");
OpEntry = Result;
+
+ DAG.transferDbgValues(Op, Result);
}
void DAGTypeLegalizer::SetSoftenedFloat(SDValue Op, SDValue Result) {
OpenPOWER on IntegriCloud