mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
ac/llvm: use invariant.load metadata on load intrinsics instead of readnone
readnone is illegal now and we should be using invariant.load since LLVM 15. (suggested by Nicolai) Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20146>
This commit is contained in:
parent
d3a03d24fc
commit
ce0a83efb8
1 changed files with 6 additions and 2 deletions
|
|
@ -309,8 +309,12 @@ LLVMValueRef ac_build_intrinsic(struct ac_llvm_context *ctx, const char *name,
|
|||
|
||||
call = LLVMBuildCall2(ctx->builder, function_type, function, params, param_count, "");
|
||||
|
||||
if (attrib_mask & AC_FUNC_ATTR_READNONE)
|
||||
LLVMAddCallSiteAttribute(call, -1, ac_get_llvm_attribute(ctx->context, "readnone"));
|
||||
if (attrib_mask & AC_FUNC_ATTR_READNONE) {
|
||||
if (LLVM_VERSION_MAJOR >= 15)
|
||||
LLVMSetMetadata(call, ctx->invariant_load_md_kind, ctx->empty_md);
|
||||
else
|
||||
LLVMAddCallSiteAttribute(call, -1, ac_get_llvm_attribute(ctx->context, "readnone"));
|
||||
}
|
||||
|
||||
if (attrib_mask & AC_FUNC_ATTR_CONVERGENT)
|
||||
LLVMAddCallSiteAttribute(call, -1, ac_get_llvm_attribute(ctx->context, "convergent"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue