aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2021-02-11 15:17:50 -0500
committerJames Y Knight <jyknight@google.com>2021-02-11 15:17:50 -0500
commit17517f3178b5cdda832c4e90f618437c13560013 (patch)
treef0ae92a136f5e5d9229e5038102a73d57801efd0 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentd06ab79816785fa362e7d96d7a398bea8064cba7 (diff)
downloadllvm-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.cpp1
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;