aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2020-01-23 16:18:34 +0100
committerGuillaume Chatelet <gchatelet@google.com>2020-01-23 17:34:32 +0100
commit59f95222d4c5e997342b0514984823a99a16d44b (patch)
treee3dc89f57ff20c4a8d48e76e51acd9bd9b331845 /clang/lib/CodeGen/TargetInfo.cpp
parentdfec702290e4cbd2fb965096788225ef3aac0986 (diff)
downloadllvm-59f95222d4c5e997342b0514984823a99a16d44b.zip
llvm-59f95222d4c5e997342b0514984823a99a16d44b.tar.gz
llvm-59f95222d4c5e997342b0514984823a99a16d44b.tar.bz2
[Alignment][NFC] Use Align with CreateAlignedStore
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, bollu Subscribers: arsenm, jvesely, nhaehnle, hiraditya, kerbowa, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D73274
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 682ef18..c803785 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -10042,9 +10042,9 @@ llvm::Function *AMDGPUTargetCodeGenInfo::createEnqueuedBlockKernel(
auto IP = CGF.Builder.saveIP();
auto *BB = llvm::BasicBlock::Create(C, "entry", F);
Builder.SetInsertPoint(BB);
- unsigned BlockAlign = CGF.CGM.getDataLayout().getPrefTypeAlignment(BlockTy);
+ const auto BlockAlign = CGF.CGM.getDataLayout().getPrefTypeAlign(BlockTy);
auto *BlockPtr = Builder.CreateAlloca(BlockTy, nullptr);
- BlockPtr->setAlignment(llvm::MaybeAlign(BlockAlign));
+ BlockPtr->setAlignment(BlockAlign);
Builder.CreateAlignedStore(F->arg_begin(), BlockPtr, BlockAlign);
auto *Cast = Builder.CreatePointerCast(BlockPtr, InvokeFT->getParamType(0));
llvm::SmallVector<llvm::Value *, 2> Args;