aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-05-25 15:31:38 -0700
committerArthur Eubanks <aeubanks@google.com>2021-05-25 16:30:34 -0700
commitad90a6be219a547873beb80f977e45e23e9247ac (patch)
tree49f0b406113e84a83d25cf7462ca33eed75a2b84 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parente67259531d7385fece6873b1da57e7cf84f110b3 (diff)
downloadllvm-ad90a6be219a547873beb80f977e45e23e9247ac.zip
llvm-ad90a6be219a547873beb80f977e45e23e9247ac.tar.gz
llvm-ad90a6be219a547873beb80f977e45e23e9247ac.tar.bz2
[OpaquePtr] Create new bitcode encoding for atomicrmw
Since the opaque pointer type won't contain the pointee type, we need to separately encode the value type for an atomicrmw. Emit this new code for atomicrmw. Handle this new code and the old one in the bitcode reader. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D103123
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index fd85b9c..bdb973e 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3103,7 +3103,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
case Instruction::AtomicRMW:
Code = bitc::FUNC_CODE_INST_ATOMICRMW;
pushValueAndType(I.getOperand(0), InstID, Vals); // ptrty + ptr
- pushValue(I.getOperand(1), InstID, Vals); // val.
+ pushValueAndType(I.getOperand(1), InstID, Vals); // valty + val
Vals.push_back(
getEncodedRMWOperation(cast<AtomicRMWInst>(I).getOperation()));
Vals.push_back(cast<AtomicRMWInst>(I).isVolatile());