File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
mlir/lib/Dialect/MemRef/IR Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2356,12 +2356,11 @@ LogicalResult ExpandShapeOp::verify() {
2356
2356
// Verify if provided output shapes are in agreement with output type.
2357
2357
DenseI64ArrayAttr staticOutputShapes = getStaticOutputShapeAttr ();
2358
2358
ArrayRef<int64_t > resShape = getResult ().getType ().getShape ();
2359
- unsigned staticShapeNum = 0 ;
2360
-
2361
- for (auto [pos, shape] : llvm::enumerate (resShape))
2362
- if (!ShapedType::isDynamic (shape) &&
2363
- shape != staticOutputShapes[staticShapeNum++])
2359
+ for (auto [pos, shape] : llvm::enumerate (resShape)) {
2360
+ if (!ShapedType::isDynamic (shape) && shape != staticOutputShapes[pos]) {
2364
2361
emitOpError (" invalid output shape provided at pos " ) << pos;
2362
+ }
2363
+ }
2365
2364
2366
2365
return success ();
2367
2366
}
You can’t perform that action at this time.
0 commit comments