diff --git a/llvm/lib/SYCLLowerIR/LowerWGScope.cpp b/llvm/lib/SYCLLowerIR/LowerWGScope.cpp index d9ad10a1e63b3..9aa318e85da82 100644 --- a/llvm/lib/SYCLLowerIR/LowerWGScope.cpp +++ b/llvm/lib/SYCLLowerIR/LowerWGScope.cpp @@ -405,9 +405,7 @@ static void copyBetweenPrivateAndShadow(Value *L, GlobalVariable *Shadow, assert(T && "Unexpected type"); if (T->isAggregateType()) { - // TODO: we should use methods which directly return MaybeAlign once such - // are added to LLVM for AllocaInst and GlobalVariable - auto ShdAlign = MaybeAlign(Shadow->getAlignment()); + auto ShdAlign = Shadow->getAlign(); Module &M = *Shadow->getParent(); auto SizeVal = M.getDataLayout().getTypeStoreSize(T); auto Size = ConstantInt::get(getSizeTTy(M), SizeVal);