Skip to content

Commit ac38a7d

Browse files
committed
[MLIR] Fix incorrect assertion in memref replacement utility
The assertion had an unchecked use of getDefiningOp. The condition itself is stale and not needed. This is a trivial/obvious fix - the buggy path wasn't exercised since the current passes/users of this utility always passed the result of an op as an "extra index". Differential Revision: https://reviews.llvm.org/D138191
1 parent 0e4378c commit ac38a7d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mlir/lib/Dialect/Affine/Utils/Utils.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,6 @@ LogicalResult mlir::replaceAllMemRefUsesWith(Value oldMemRef, Value newMemRef,
11991199

12001200
// Prepend 'extraIndices' in 'newMapOperands'.
12011201
for (Value extraIndex : extraIndices) {
1202-
assert(extraIndex.getDefiningOp()->getNumResults() == 1 &&
1203-
"single result op's expected to generate these indices");
12041202
assert((isValidDim(extraIndex) || isValidSymbol(extraIndex)) &&
12051203
"invalid memory op index");
12061204
newMapOperands.push_back(extraIndex);

0 commit comments

Comments
 (0)