diff --git a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp --- a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp @@ -38,7 +38,7 @@ // `inputFilename` and returns a module containing the SPIR-V module. static OwningModuleRef deserializeModule(const llvm::MemoryBuffer *input, MLIRContext *context) { - Builder builder(context); + context->loadDialect(); // Make sure the input stream can be treated as a stream of SPIR-V words auto start = input->getBufferStart();