[PATCH] D152059: [AVR] Replace shift-to-loop IR pass with common shift code

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 22:07:43 PDT 2023


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:2192
+    BuildMI(EntryBB, dl, TII.get(AVR::RJMPk)).addMBB(Fallthrough);
+    ExitBB = EntryBB->splitAt(MI, false);
+  }
----------------
Can we change the logic to

```
if (EntryBB->canFallThrough()) {
  // do the padding of the RJMP
}
ExitBB = EntryBB->splitAt(MI, false);
```

or 
```
if (MI is the last instruction of EntryBB) {
  // do the padding of the RJMP
}
ExitBB = EntryBB->splitAt(MI, false);
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152059



More information about the llvm-commits mailing list