[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
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 @@
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;