Skip to content

Commit 0f55af2

Browse files
committed
LAA: address review; AllocSz
1 parent 286f37d commit 0f55af2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,8 +1973,8 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
19731973
// Note that store size is different from alloc size, which is dependent on
19741974
// store size. We use the former for checking illegal cases, and the latter
19751975
// for scaling strides.
1976-
TypeSize AStoreSz = DL.getTypeStoreSizeInBits(ATy),
1977-
BStoreSz = DL.getTypeStoreSizeInBits(BTy);
1976+
TypeSize AStoreSz = DL.getTypeStoreSize(ATy),
1977+
BStoreSz = DL.getTypeStoreSize(BTy);
19781978

19791979
// When the distance is zero, we're reading/writing the same memory location:
19801980
// check that the store sizes are equal. Otherwise, fail with an unknown
@@ -1989,8 +1989,8 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
19891989

19901990
// The TypeByteSize is used to scale Distance and VF. In these contexts, the
19911991
// only size that matters is the size of the Sink.
1992-
uint64_t ASz = DL.getTypeAllocSize(ATy),
1993-
TypeByteSize = DL.getTypeAllocSize(BTy);
1992+
uint64_t ASz = alignTo(AStoreSz, DL.getABITypeAlign(ATy).value()),
1993+
TypeByteSize = alignTo(BStoreSz, DL.getABITypeAlign(BTy).value());
19941994

19951995
// We scale the strides by the alloc-type-sizes, so we can check that the
19961996
// common distance is equal when ASz != BSz.

0 commit comments

Comments
 (0)