[SelectionDAG] Transfer DbgValues when integer operations are promoted
authorAaron Smith <aaron.smith@microsoft.com>
Mon, 19 Mar 2018 22:58:50 +0000 (22:58 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Mon, 19 Mar 2018 22:58:50 +0000 (22:58 +0000)
commit6738960588d4c2cf5dea5d9d5fed52935e732446
tree39ab15257b530a8388ca38a71f9bca37d4eca9d8
parent695b211ce6430348c4b24c2921fe31a6075190b8
[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
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/test/CodeGen/ARM/debug-info-d16-reg.ll
llvm/test/DebugInfo/AArch64/dbg-value-i8.ll [new file with mode: 0644]