[llvm] b609741 - LoopVectorize: Pass through AssumptionCache
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 16:25:34 PDT 2022
Author: Matt Arsenault
Date: 2022-09-19T19:25:22-04:00
New Revision: b609741958db3e19a70111ba22d45d07683530ca
URL: https://github.com/llvm/llvm-project/commit/b609741958db3e19a70111ba22d45d07683530ca
DIFF: https://github.com/llvm/llvm-project/commit/b609741958db3e19a70111ba22d45d07683530ca.diff
LOG: LoopVectorize: Pass through AssumptionCache
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
index 662f9caa14bb..e1d5dc735203 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
@@ -700,11 +700,11 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
continue;
}
- // TODO: Instead of recording the AllowedExit, it would be good to record the
- // complementary set: NotAllowedExit. These include (but may not be
- // limited to):
+ // TODO: Instead of recording the AllowedExit, it would be good to
+ // record the complementary set: NotAllowedExit. These include (but may
+ // not be limited to):
// 1. Reduction phis as they represent the one-before-last value, which
- // is not available when vectorized
+ // is not available when vectorized
// 2. Induction phis and increment when SCEV predicates cannot be used
// outside the loop - see addInductionPhi
// 3. Non-Phis with outside uses when SCEV predicates cannot be used
@@ -713,7 +713,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
// 4. FixedOrderRecurrence phis that can possibly be handled by
// extraction.
// By recording these, we can then reason about ways to vectorize each
- // of these NotAllowedExit.
+ // of these NotAllowedExit.
InductionDescriptor ID;
if (InductionDescriptor::isInductionPHI(Phi, TheLoop, PSE, ID)) {
addInductionPhi(Phi, ID, AllowedExit);
@@ -1167,7 +1167,7 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {
for (Instruction &I : *BB) {
LoadInst *LI = dyn_cast<LoadInst>(&I);
if (LI && !LI->getType()->isVectorTy() && !mustSuppressSpeculation(*LI) &&
- isDereferenceableAndAlignedInLoop(LI, TheLoop, SE, *DT))
+ isDereferenceableAndAlignedInLoop(LI, TheLoop, SE, *DT, AC))
SafePointers.insert(LI->getPointerOperand());
}
}
More information about the llvm-commits
mailing list