From 1768957c822faa1425285d2c49b4e73d9b4ee886 Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Wed, 14 Feb 2018 13:10:35 +0000 Subject: [Utils] Salvage the debug info of DCE'ed 'and' instructions Preserve debug info from a dead 'and' instruction with a constant. Patch by Djordje Todorovic. Differential Revision: https://reviews.llvm.org/D43163 llvm-svn: 325119 --- llvm/lib/Transforms/Utils/Local.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Transforms/Utils/Local.cpp') diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 34f7d41..39d66e0 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1564,6 +1564,9 @@ void llvm::salvageDebugInfo(Instruction &I) { case Instruction::Or: applyOps(DII, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_or}); break; + case Instruction::And: + applyOps(DII, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_and}); + break; case Instruction::Xor: applyOps(DII, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_xor}); break; -- cgit v1.1