For PR950: Implement read/write of ICmp and FCmp constant expressions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32172 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 127a3ba..fdd0f3c 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -303,6 +303,8 @@
       Slot = Table.getSlot((*OI)->getType());
       output_typeid((unsigned)Slot);
     }
+    if (CE->isCompare())
+      output_vbr((unsigned)CE->getPredicate());
     return;
   } else if (isa<UndefValue>(CPV)) {
     output_vbr(1U);       // 1 -> UndefValue constant.