OSDN Git Service

DebugInfo: Avoid propagating incorrect debug locations in SelectionDAG via CSE.
authorWolfgang Pieb <Wolfgang_Pieb@playstation.sony.com>
Mon, 2 May 2016 22:50:51 +0000 (22:50 +0000)
committerWolfgang Pieb <Wolfgang_Pieb@playstation.sony.com>
Mon, 2 May 2016 22:50:51 +0000 (22:50 +0000)
commit844d21c2f6dbb803ca8959979b9c7c91d208e024
tree1a4c12ec7c9f2855e8dfde409142fab978ac0b7b
parent2ef976219b08f127416d11ae0b997272e2ff9ff3
DebugInfo: Avoid propagating incorrect debug locations in SelectionDAG via CSE.

Summary:
When SelectionDAG performs CSE it is possible that the context's source
location is different from that of the selected node. This can lead to
incorrect line number records. We update the debug location to the
one that occurs earlier in the instruction sequence.

This fixes PR21006.

Reviewers: echristo, sdmitrouk

Subscribers: jevinskie, asl, llvm-commits

Differential Revision: http://reviews.llvm.org/D12094

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268323 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/DebugInfo/Generic/isel-cse-line.ll [new file with mode: 0644]