diff options
author | Marek Olšák <[email protected]> | 2017-03-05 23:19:57 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-06 14:13:04 +0100 |
commit | 9b08f044bef03194759064c3d680143d264f507f (patch) | |
tree | 2f0fdb6bb67f514aae967ca9846112ac4a4a7b7d /src/amd | |
parent | 6398a092131ab0c9cb47f2a6f78ae1d8ba0ea65c (diff) |
radeonsi: fix LLVM 3.9 - don't use non-matching attributes on declarations
Call site attributes are used since LLVM 4.0.
This also reverts commit b19caecbd6f310c1663b0cfe483d113ae3bd5fe2
"radeon/ac: fix intrinsic version check", because this is the correct fix.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index acda5e26db7..20c6eb80560 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -693,7 +693,7 @@ ac_build_buffer_load(struct ac_llvm_context *ctx, /* READNONE means writes can't * affect it, while READONLY means * that writes can affect it. */ - readonly_memory ? + readonly_memory && HAVE_LLVM >= 0x0400 ? AC_FUNC_ATTR_READNONE : AC_FUNC_ATTR_READONLY); } else { @@ -736,7 +736,7 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx, LLVMValueRef voffset, bool readonly_memory) { - if (HAVE_LLVM >= 0x0400) { + if (HAVE_LLVM >= 0x0309) { LLVMValueRef args [] = { LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, ""), vindex, @@ -751,7 +751,7 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx, /* READNONE means writes can't * affect it, while READONLY means * that writes can affect it. */ - readonly_memory ? + readonly_memory && HAVE_LLVM >= 0x0400 ? AC_FUNC_ATTR_READNONE : AC_FUNC_ATTR_READONLY); } |