summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@mips.com>2018-02-14 13:10:35 +0000
committerPetar Jovanovic <petar.jovanovic@mips.com>2018-02-14 13:10:35 +0000
commit1768957c822faa1425285d2c49b4e73d9b4ee886 (patch)
tree03a4e65689b40e8062769dbeceda41d79f1b5d38 /llvm/lib/Transforms/Utils/Local.cpp
parent782bfcfd0ce307e0252d0e4902d752212a07b640 (diff)
downloadbcm5719-llvm-1768957c822faa1425285d2c49b4e73d9b4ee886.tar.gz
bcm5719-llvm-1768957c822faa1425285d2c49b4e73d9b4ee886.zip
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 34f7d418ced..39d66e0f9b0 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;
OpenPOWER on IntegriCloud