Author: Philip Reames
Date: 2021-01-12T12:57:13-08:00
New Revision: caafdf07bbccbe89219539e2b56043c2a98358f1

URL: 
https://github.com/llvm/llvm-project/commit/caafdf07bbccbe89219539e2b56043c2a98358f1
DIFF: 
https://github.com/llvm/llvm-project/commit/caafdf07bbccbe89219539e2b56043c2a98358f1.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/LoopVersioning.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp 
b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
index b54aee35d56d..599bd1feb2bc 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(


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to