[Mlir-commits] [mlir] df34c28 - Fix MLIR Bytecode backward deployment

Mehdi Amini llvmlistbot at llvm.org
Thu May 25 20:40:46 PDT 2023


Author: Mehdi Amini
Date: 2023-05-25T20:40:03-07:00
New Revision: df34c288c428eb4b867c8075def48b3d1727d60b

URL: https://github.com/llvm/llvm-project/commit/df34c288c428eb4b867c8075def48b3d1727d60b
DIFF: https://github.com/llvm/llvm-project/commit/df34c288c428eb4b867c8075def48b3d1727d60b.diff

LOG: Fix MLIR Bytecode backward deployment

The condition for guarding the properties section was reversed.

Added: 
    

Modified: 
    mlir/lib/Bytecode/Writer/BytecodeWriter.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
index 0f1395ce4a53..252fa92e19e4 100644
--- a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
+++ b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
@@ -652,7 +652,7 @@ LogicalResult BytecodeWriter::write(Operation *rootOp, raw_ostream &os) {
   writeStringSection(emitter);
 
   // Emit the properties section.
-  if (config.bytecodeVersion <= 5)
+  if (config.bytecodeVersion >= 5)
     writePropertiesSection(emitter);
   else if (!propertiesSection.empty())
     return rootOp->emitError(


        


More information about the Mlir-commits mailing list