[Utils] Salvage debug info from dead 'or' instructions
authorVedant Kumar <vsk@apple.com>
Fri, 9 Feb 2018 19:19:55 +0000 (19:19 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 9 Feb 2018 19:19:55 +0000 (19:19 +0000)
commit04386d8e3de6c9fe79d0f911841ff94368bd61cc
treeb2a5d6cbcfc7acb0dcd25730e737ea7177d1ea9f
parent9b48e8d233e9013dc6a38e628350c6d76c46a58a
[Utils] Salvage debug info from dead 'or' instructions

Extend salvageDebugInfo to preserve the debug info from a dead 'or'
with a constant.

Patch by Ismail Badawi!

Differential Revision: https://reviews.llvm.org/D43129

llvm-svn: 324764
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/InstCombine/debuginfo-dce-or.ll [new file with mode: 0644]