IR: add "cmpxchg weak" variant to support permitted failure.
[oota-llvm.git] / lib / Bitcode / Writer / BitcodeWriter.cpp
index 7793d3e69eda60d499dc3046d8f676b7ff68d1c4..3ba7358ae5b94b718436c4d6336b351088d4d74e 100644 (file)
@@ -1449,6 +1449,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
                      cast<AtomicCmpXchgInst>(I).getSynchScope()));
     Vals.push_back(GetEncodedOrdering(
                      cast<AtomicCmpXchgInst>(I).getFailureOrdering()));
+    Vals.push_back(cast<AtomicCmpXchgInst>(I).isWeak());
     break;
   case Instruction::AtomicRMW:
     Code = bitc::FUNC_CODE_INST_ATOMICRMW;