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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits