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() {
23562356 // Verify if provided output shapes are in agreement with output type.
23572357 DenseI64ArrayAttr staticOutputShapes = getStaticOutputShapeAttr ();
23582358 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]) {
23642361 emitOpError (" invalid output shape provided at pos " ) << pos;
2362+ }
2363+ }
23652364
23662365 return success ();
23672366}
You can’t perform that action at this time.
0 commit comments