summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index b7ccea88372..aa2d488780e 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1675,7 +1675,11 @@ emit_llvm_intrinsic(struct nir_to_llvm_context *ctx, const char *name,
LLVMSetFunctionCallConv(function, LLVMCCallConv);
LLVMSetLinkage(function, LLVMExternalLinkage);
- ac_add_function_attr(function, 0, attrib_mask | AC_FUNC_ATTR_NOUNWIND);
+ attrib_mask |= AC_FUNC_ATTR_NOUNWIND;
+ while (attrib_mask) {
+ enum ac_func_attr attr = 1u << u_bit_scan(&attrib_mask);
+ ac_add_function_attr(function, -1, attr);
+ }
}
return LLVMBuildCall(ctx->builder, function, params, param_count, "");
}