summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-11-10 14:12:32 +1000
committerDave Airlie <[email protected]>2016-11-10 14:12:32 +1000
commit19decd8ce43a7fad9b6a276d47296336f062ca23 (patch)
treef30b0d3ba6fa64e047f7315ee6c2c47d7d8f15c2 /src
parent2fdaf38c0106d87f89fa20fbe229e66d9a3ad14a (diff)
radv: fixup botched llvm API changes.
Reported-by: Jan Vesely <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 5468483c486..35e669ad7e1 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -296,14 +296,13 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module,
LLVMSetFunctionCallConv(main_function, RADEON_LLVM_AMDGPU_CS);
for (unsigned i = 0; i < sgpr_params; ++i) {
- LLVMValueRef P = LLVMGetParam(main_function, i);
-
if (i < array_params) {
- ac_add_function_attr(P, i + 1, AC_FUNC_ATTR_BYVAL);
+ LLVMValueRef P = LLVMGetParam(main_function, i);
+ ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_BYVAL);
ac_add_attr_dereferenceable(P, UINT64_MAX);
}
else {
- ac_add_function_attr(P, i + 1, AC_FUNC_ATTR_INREG);
+ ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_INREG);
}
}