OSDN Git Service

[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)
commit88275016ddb2e7699753b1a6ee80374cc3f467b3
tree6d75216293a1609b50357d21ca40f6bd001eaf70
parentaa9b406e17ab028c95099d41aa10395df5d6e326
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327919 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
test/CodeGen/ARM/debug-info-d16-reg.ll
test/DebugInfo/AArch64/dbg-value-i8.ll [new file with mode: 0644]