[PATCH] D153197: [AVR] Expand shifts during AVRISelLowering
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 01:47:35 PDT 2023
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:2207
+ MF->push_back(LoopBB);
+ MachineBasicBlock *ExitBB = EntryBB->splitAt(MI, false);
+
----------------
Patryk27 wrote:
> Alright, this is wrong, after all - I've just tested it on a more elaborate code in rustc and `EntryBB->removeSuccessor(ExitBB);` triggers an LLVM panic (presumably because EntryBB == ExitBB).
>
> I kinda don't understand why doing something like this:
>
> ```
> MachineBasicBlock *ExitBB = EntryBB->splitAt(MI, false);
>
> if (EntryBB == ExitBB) {
> assert(EntryBB->canFallThrough() && "Expected a fallthrough block!");
> ExitBB = EntryBB->getFallThrough();
> }
> ```
>
> ... is not sufficient, though 👀
Is it possible to fix the 32-bit shift issue in moderate way? for example, keep the pass in `AVRShiftExpand.cpp`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153197/new/
https://reviews.llvm.org/D153197
More information about the llvm-commits
mailing list