Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.131 -> 1.132
---
Log message:

Support ICmp/FCmp constant expression reading and writing.


---
Diffs of the changes:  (+7 -0)

 Writer.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.131 
llvm/lib/Bytecode/Writer/Writer.cpp:1.132
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.131   Sun Dec  3 00:28:54 2006
+++ llvm/lib/Bytecode/Writer/Writer.cpp Sun Dec  3 11:17:02 2006
@@ -791,6 +791,13 @@
     }
   }
 
+  // In the weird case of the ICmp or FCmp instructions, we need to also put
+  // out the instruction's predicate value. We do that here, after the
+  // instruction's type and operands have been written so we can reuse the
+  // code above.
+  if (const CmpInst* CI = dyn_cast<CmpInst>(&I))
+    output_vbr((unsigned)CI->getPredicate());
+
   // If we weren't handled before here, we either have a large number of
   // operands or a large operand index that we are referring to.
   outputInstructionFormat0(&I, Opcode, Table, Type);



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to