diff --git a/mlir/lib/IR/BuiltinTypes.cpp b/mlir/lib/IR/BuiltinTypes.cpp --- a/mlir/lib/IR/BuiltinTypes.cpp +++ b/mlir/lib/IR/BuiltinTypes.cpp @@ -515,6 +515,8 @@ function_ref walkAttrsFn, function_ref walkTypesFn) const { walkTypesFn(getElementType()); + if (getEncoding()) + walkAttrsFn(getEncoding()); } //===----------------------------------------------------------------------===//