[Lldb-commits] [PATCH] D131613: [LLDB][NFC] Clean up dead code

Slava Gurevich via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 10 12:54:59 PDT 2022


fixathon created this revision.
fixathon added reviewers: clayborg, JDevlieghere, DavidSpickett, jasonmolenda.
Herald added a project: All.
fixathon requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Remove unreachable code that will never execute.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131613

Files:
  lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp


Index: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
===================================================================
--- lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -3769,10 +3769,6 @@
 
     switch (use_encoding) {
     case eEncodingT1:
-      // Due to the above special case handling!
-      if (shift_type == SRType_ROR)
-        return false;
-
       Rd = Bits32(opcode, 2, 0);
       Rm = Bits32(opcode, 5, 3);
       setflags = !InITBlock();
@@ -4139,8 +4135,6 @@
 
     // if wback && registers<n> == '0' then R[n] = R[n] - 4*BitCount(registers);
     if (wback && BitIsClear(registers, n)) {
-      if (!success)
-        return false;
 
       offset = (addr_byte_size * BitCount(registers)) * -1;
       context.type = EmulateInstruction::eContextAdjustBaseRegister;
@@ -4277,8 +4271,6 @@
 
     // if wback && registers<n> == '0' then R[n] = R[n] - 4*BitCount(registers);
     if (wback && BitIsClear(registers, n)) {
-      if (!success)
-        return false;
 
       offset = (addr_byte_size * BitCount(registers)) * -1;
       context.type = EmulateInstruction::eContextAdjustBaseRegister;
@@ -4391,8 +4383,6 @@
 
     // if wback && registers<n> == '0' then R[n] = R[n] + 4*BitCount(registers);
     if (wback && BitIsClear(registers, n)) {
-      if (!success)
-        return false;
 
       offset = addr_byte_size * BitCount(registers);
       context.type = EmulateInstruction::eContextAdjustBaseRegister;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131613.451607.patch
Type: text/x-patch
Size: 1538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220810/59f72b78/attachment.bin>


More information about the lldb-commits mailing list