@@ -1973,8 +1973,8 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
1973
1973
// Note that store size is different from alloc size, which is dependent on
1974
1974
// store size. We use the former for checking illegal cases, and the latter
1975
1975
// 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);
1978
1978
1979
1979
// When the distance is zero, we're reading/writing the same memory location:
1980
1980
// check that the store sizes are equal. Otherwise, fail with an unknown
@@ -1989,8 +1989,8 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
1989
1989
1990
1990
// The TypeByteSize is used to scale Distance and VF. In these contexts, the
1991
1991
// 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 () );
1994
1994
1995
1995
// We scale the strides by the alloc-type-sizes, so we can check that the
1996
1996
// common distance is equal when ASz != BSz.
0 commit comments