Skip to content

Commit 9451c46

Browse files
Fix offset of vloadn
1 parent 9704c72 commit 9451c46

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/optimization/Combiner.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,9 +1407,8 @@ void optimizations::combineDMALoads(const Module& module, Method& method, const
14071407
auto vectorSize = elemType.getInMemoryWidth() * vectorLength;
14081408

14091409
// TODO: limit loadInstrs.size()
1410-
Value offset = assign(it, TYPE_INT32) = offsetValues[0] << 4_val;
1411-
// Value offset = assign(it, TYPE_INT32) = offsetValues[0] *
1412-
// Literal(vectorSize);
1410+
Value offset = assign(it, TYPE_INT32) =
1411+
offsetValues[0] * Literal(vectorLength * elemType.getInMemoryWidth());
14131412
Value addr = assign(it, TYPE_INT32) = offset + addrArg;
14141413

14151414
uint16_t memoryPitch =
@@ -1425,8 +1424,6 @@ void optimizations::combineDMALoads(const Module& module, Method& method, const
14251424
method.vpm->insertReadRAM(method, it, addr, VectorType, /* &area */ nullptr,
14261425
true, INT_ZERO, entries, Optional<uint16_t>(memoryPitch));
14271426

1428-
// const VPMArea* area = nullptr, bool useMutex = true, const Value&
1429-
// inAreaOffset = INT_ZERO);
14301427
it = method.vpm->insertReadVPM(method, it, output, &area, true);
14311428
}
14321429
else

0 commit comments

Comments
 (0)