diff options
author | Philip Reames <listmail@philipreames.com> | 2021-01-12 12:54:07 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-01-12 12:57:13 -0800 |
commit | caafdf07bbccbe89219539e2b56043c2a98358f1 (patch) | |
tree | fc57c2e3366915eae65c66bba2262cac1ef25342 /llvm/lib/Transforms/Utils/LoopVersioning.cpp | |
parent | fb063c933f0062db7fee622f7a43a6a5e560672d (diff) | |
download | llvm-caafdf07bbccbe89219539e2b56043c2a98358f1.zip llvm-caafdf07bbccbe89219539e2b56043c2a98358f1.tar.gz llvm-caafdf07bbccbe89219539e2b56043c2a98358f1.tar.bz2 |
[LV] Weaken spuriously strong assert in LoopVersioning
LoopVectorize uses some utilities on LoopVersioning, but doesn't actually use it for, you know, versioning. As a result, the precondition LoopVersioning expects is too strong for this user. At the moment, LoopVectorize supports any loop with a unique exit block, so check the same precondition here.
Really, the whole class structure here is a mess. We should separate the actual versioning from the metadata updates, but that's a bigger problem.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopVersioning.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp index b54aee3..599bd1f 100644 --- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp +++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp @@ -44,7 +44,7 @@ LoopVersioning::LoopVersioning(const LoopAccessInfo &LAI, AliasChecks(Checks.begin(), Checks.end()), Preds(LAI.getPSE().getUnionPredicate()), LAI(LAI), LI(LI), DT(DT), SE(SE) { - assert(L->getExitBlock() && "No single exit block"); + assert(L->getUniqueExitBlock() && "No single exit block"); } void LoopVersioning::versionLoop( |