From: Marek Olšák Date: Tue, 2 Mar 2021 07:59:23 +0000 (-0500) Subject: ac/llvm: fix ac_build_atomic_rmw with LLVM 13 X-Git-Tag: upstream/21.2.3~7034 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9e6c7a22063ca84794f474166cb7e3ad2da3901;p=platform%2Fupstream%2Fmesa.git ac/llvm: fix ac_build_atomic_rmw with LLVM 13 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4383 Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Zoltán Böszörményi Part-of: --- diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp index ebeafae..0ab9517 100644 --- a/src/amd/llvm/ac_llvm_helper.cpp +++ b/src/amd/llvm/ac_llvm_helper.cpp @@ -321,6 +321,9 @@ LLVMValueRef ac_build_atomic_rmw(struct ac_llvm_context *ctx, LLVMAtomicRMWBinOp unsigned SSID = llvm::unwrap(ctx->context)->getOrInsertSyncScopeID(sync_scope); return llvm::wrap(llvm::unwrap(ctx->builder) ->CreateAtomicRMW(binop, llvm::unwrap(ptr), llvm::unwrap(val), +#if LLVM_VERSION_MAJOR >= 13 + llvm::MaybeAlign(0), +#endif llvm::AtomicOrdering::SequentiallyConsistent, SSID)); } @@ -331,6 +334,9 @@ LLVMValueRef ac_build_atomic_cmp_xchg(struct ac_llvm_context *ctx, LLVMValueRef return llvm::wrap(llvm::unwrap(ctx->builder) ->CreateAtomicCmpXchg(llvm::unwrap(ptr), llvm::unwrap(cmp), llvm::unwrap(val), +#if LLVM_VERSION_MAJOR >= 13 + llvm::MaybeAlign(0), +#endif llvm::AtomicOrdering::SequentiallyConsistent, llvm::AtomicOrdering::SequentiallyConsistent, SSID)); }