[PATCH] D95806: [LoopUnrollAndJam] Check if the loops have an Exit Block
Sidharth Baveja via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 11:05:51 PST 2021
sidbav marked 3 inline comments as done.
sidbav added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:818
if (!L->isRotatedForm())
return false;
----------------
Whitney wrote:
> ```
> bool isRotatedForm() const {
> assert(!isInvalid() && "Loop not in a valid state!");
> BasicBlock *Latch = getLoopLatch();
> return Latch && isLoopExiting(Latch);
> }
> ```
> So shouldn't one of latch successor be an exit block?
Yeah you are correct. What is strange that when using this specific target triple and data layout, for what ever reason `L->getExitBlock()` gets set to nullptr, which was the reason that error took place.
I am currently investigating why this takes place for this specific target triple/layout.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95806/new/
https://reviews.llvm.org/D95806
More information about the llvm-commits
mailing list