diff --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp --- a/mlir/test/lib/Dialect/Test/TestDialect.cpp +++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp @@ -1141,9 +1141,8 @@ auto type = IntegerType::get(context, 17); Attribute encoding; - if (auto ranked_ty = sval.dyn_cast()) { + if (auto ranked_ty = sval.dyn_cast()) encoding = ranked_ty.getEncoding(); - } inferredReturnShapes.push_back(ShapedTypeComponents({dim}, type, encoding)); return success(); }