summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-12-19 15:41:05 +0100
committerGuillaume Chatelet <gchatelet@google.com>2019-12-19 20:03:35 +0100
commitb4982d6ecd67f52e6a783985e8708b319518fddf (patch)
tree0d1e019b8ece7c478a53a5432af095ce7ee89c92 /llvm/lib
parent1edb3ea6457766d24de5a3cddf2b970e05b35ed3 (diff)
downloadbcm5719-llvm-b4982d6ecd67f52e6a783985e8708b319518fddf.tar.gz
bcm5719-llvm-b4982d6ecd67f52e6a783985e8708b319518fddf.zip
[Alignment][NFC] Align compatible methods for CreateElementUnorderedAtomicMemSet
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71703
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/IRBuilder.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/IRBuilder.cpp b/llvm/lib/IR/IRBuilder.cpp
index 1be5e40220d..30b558a655c 100644
--- a/llvm/lib/IR/IRBuilder.cpp
+++ b/llvm/lib/IR/IRBuilder.cpp
@@ -125,10 +125,8 @@ CallInst *IRBuilderBase::CreateMemSet(Value *Ptr, Value *Val, Value *Size,
}
CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemSet(
- Value *Ptr, Value *Val, Value *Size, unsigned Align, uint32_t ElementSize,
+ Value *Ptr, Value *Val, Value *Size, Align Alignment, uint32_t ElementSize,
MDNode *TBAATag, MDNode *ScopeTag, MDNode *NoAliasTag) {
- assert(Align >= ElementSize &&
- "Pointer alignment must be at least element size.");
Ptr = getCastedInt8PtrValue(Ptr);
Value *Ops[] = {Ptr, Val, Size, getInt32(ElementSize)};
@@ -139,7 +137,7 @@ CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemSet(
CallInst *CI = createCallHelper(TheFn, Ops, this);
- cast<AtomicMemSetInst>(CI)->setDestAlignment(Align);
+ cast<AtomicMemSetInst>(CI)->setDestAlignment(Alignment);
// Set the TBAA info if present.
if (TBAATag)
OpenPOWER on IntegriCloud