Skip to content

Commit 1c6a594

Browse files
authored
Apply suggestions from code review
1 parent e6bb89c commit 1c6a594

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
21832183
// the minimum distance needed is 28, which is greater than distance. It is
21842184
// not safe to do vectorization.
21852185
//
2186-
// We use MaxStride (maximum of src and sink strides), to get conservative
2186+
// We use MaxStride (maximum of src and sink strides) to get a conservative
21872187
// lower bound on the MinDistanceNeeded in case of different strides.
21882188

21892189
// We know that Dist is positive, but it may not be constant. Use the signed
@@ -2235,9 +2235,6 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
22352235
couldPreventStoreLoadForward(MinDistance, TypeByteSize, *CommonStride))
22362236
return Dependence::BackwardVectorizableButPreventsForwarding;
22372237

2238-
// An update to MinDepDistBytes requires an update to MaxSafeVectorWidthInBits
2239-
// since there is a backwards dependency. We use MaxStride to get a
2240-
// conservative upper bound on MaxVF.
22412238
uint64_t MaxVF = MinDepDistBytes / MaxStride;
22422239
LLVM_DEBUG(dbgs() << "LAA: Positive min distance " << MinDistance
22432240
<< " with max VF = " << MaxVF << '\n');

llvm/test/Analysis/LoopAccessAnalysis/different_strides.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
2-
; RUN: opt --disable-output -mtriple=x86_64 --passes="print<access-info>" %s 2>&1 | FileCheck %s
2+
; RUN: opt -passes="print<access-info>" %s 2>&1 | FileCheck %s
33

44
@a = dso_local local_unnamed_addr global [65536 x float] zeroinitializer, align 16
55

0 commit comments

Comments
 (0)