[PATCH] D80477: [LoopUnroll] Support loop with multi exiting blocks
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 03:11:40 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUnroll.cpp:322
+ dyn_cast_or_null<BranchInst>(ExitingBlock->getTerminator())) {
+ if (ExitingBI->isUnconditional())
+ continue;
----------------
An exiting block can't end in an unconditional branch.
In general, we don't know which exit the loop is actually going to use. Setting BI to refer to an arbitrary non-latch branch is suspicious; is it really necessary?
If you want to support loops with multiple exits, we need some appropriate testcases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80477/new/
https://reviews.llvm.org/D80477
More information about the llvm-commits
mailing list