diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2021-02-11 15:17:50 -0500 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2021-02-11 15:17:50 -0500 |
commit | 17517f3178b5cdda832c4e90f618437c13560013 (patch) | |
tree | f0ae92a136f5e5d9229e5038102a73d57801efd0 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | d06ab79816785fa362e7d96d7a398bea8064cba7 (diff) | |
download | llvm-17517f3178b5cdda832c4e90f618437c13560013.zip llvm-17517f3178b5cdda832c4e90f618437c13560013.tar.gz llvm-17517f3178b5cdda832c4e90f618437c13560013.tar.bz2 |
Encode alignment attribute for `cmpxchg`
This is a follow up patch to D83136 adding the align attribute to `cmpxchg`.
See also D83465 for `atomicrmw`.
Differential Revision: https://reviews.llvm.org/D87443
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 29620ff..9a4f724 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -3060,6 +3060,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I, Vals.push_back( getEncodedOrdering(cast<AtomicCmpXchgInst>(I).getFailureOrdering())); Vals.push_back(cast<AtomicCmpXchgInst>(I).isWeak()); + Vals.push_back(getEncodedAlign(cast<AtomicCmpXchgInst>(I).getAlign())); break; case Instruction::AtomicRMW: Code = bitc::FUNC_CODE_INST_ATOMICRMW; |