Fix misencoding of calling conventions

llvm-svn: 28411
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp
index 80abcac..4ec6b2a 100644
--- a/llvm/lib/Bytecode/Writer/Writer.cpp
+++ b/llvm/lib/Bytecode/Writer/Writer.cpp
@@ -734,8 +734,9 @@
       // If this is the escape sequence for call, emit the tailcall/cc info.
       const CallInst &CI = cast<CallInst>(I);
       ++NumOperands;
-      if (NumOperands < 3) {
-        Slots[NumOperands-1] = (CI.getCallingConv() << 1)|unsigned(CI.isTailCall());
+      if (NumOperands <= 3) {
+        Slots[NumOperands-1] =
+          (CI.getCallingConv() << 1)|unsigned(CI.isTailCall());
         if (Slots[NumOperands-1] > MaxOpSlot)
           MaxOpSlot = Slots[NumOperands-1];
       }