[PATCH] D110691: [MSP430] Recognize Bi as an indirect branch in analyzeBranch. NFC.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 29 04:12:04 PDT 2021


foad updated this revision to Diff 375828.
foad added a comment.

Treat Bi as an unconditional branch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110691/new/

https://reviews.llvm.org/D110691

Files:
  llvm/lib/Target/MSP430/MSP430InstrInfo.cpp


Index: llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
===================================================================
--- llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
+++ llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
@@ -116,6 +116,7 @@
       continue;
     if (I->getOpcode() != MSP430::JMP &&
         I->getOpcode() != MSP430::JCC &&
+        I->getOpcode() != MSP430::Bi &&
         I->getOpcode() != MSP430::Br &&
         I->getOpcode() != MSP430::Bm)
       break;
@@ -189,7 +190,7 @@
       return true;
 
     // Handle unconditional branches.
-    if (I->getOpcode() == MSP430::JMP) {
+    if (I->getOpcode() == MSP430::JMP || I->getOpcode() == MSP430::Bi) {
       if (!AllowModify) {
         TBB = I->getOperand(0).getMBB();
         continue;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110691.375828.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210929/a7dca578/attachment.bin>


More information about the llvm-commits mailing list