diff --git a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp --- a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp +++ b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp @@ -648,7 +648,8 @@ writeStringSection(emitter); // Emit the properties section. - writePropertiesSection(emitter); + if (config.bytecodeVersion >= 4) + writePropertiesSection(emitter); // Write the generated bytecode to the provided output stream. emitter.writeTo(os);