Skip to content

Commit 1859a9b

Browse files
committed
Update comment
1 parent 7323aa0 commit 1859a9b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2622,9 +2622,7 @@ Type SubViewOp::inferResultType(MemRefType sourceMemRefType,
26222622
dispatchIndexOpFoldResults(sizes, dynamicSizes, staticSizes);
26232623
dispatchIndexOpFoldResults(strides, dynamicStrides, staticStrides);
26242624

2625-
// Double-check the offsets, sizes, and strides after constant folding.
2626-
// This allows throwing a more informative assertion message than
2627-
// what would be thrown at a later point.
2625+
// TODO: Handle these situations gracefully in the canonicalizer.
26282626
for (int64_t offset : staticOffsets) {
26292627
if (!ShapedType::isDynamic(offset))
26302628
assert(offset >= 0 && "expected subview offsets to be non-negative");
@@ -2633,7 +2631,6 @@ Type SubViewOp::inferResultType(MemRefType sourceMemRefType,
26332631
if (!ShapedType::isDynamic(size))
26342632
assert(size >= 0 && "expected subview sizes to be non-negative");
26352633
}
2636-
26372634
return SubViewOp::inferResultType(sourceMemRefType, staticOffsets,
26382635
staticSizes, staticStrides);
26392636
}

0 commit comments

Comments
 (0)