diff options
author | Samuel Pitoiset <[email protected]> | 2019-06-14 12:00:26 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-06-17 08:58:33 +0200 |
commit | b5012a05185c4d1c019b352fc9367a39c418bf4d (patch) | |
tree | 5816d4559550ed79c06a797cf006b24f6b5226f3 /src/amd/common/ac_llvm_build.c | |
parent | d72bbb2c8969732c86cbeba58ddf0ff83be07f72 (diff) |
ac: update llvm.amdgcn.icmp intrinsic name for LLVM 9+
LLVM r363339 changed llvm.amdgcn.icmp.i* to llvm.amdgcn.icmp.i64.i*.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-By: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.c')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 88e89d1dfb4..b93fdde023e 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -441,6 +441,7 @@ LLVMValueRef ac_build_ballot(struct ac_llvm_context *ctx, LLVMValueRef value) { + const char *name = HAVE_LLVM >= 0x900 ? "llvm.amdgcn.icmp.i64.i32" : "llvm.amdgcn.icmp.i32"; LLVMValueRef args[3] = { value, ctx->i32_0, @@ -454,8 +455,7 @@ ac_build_ballot(struct ac_llvm_context *ctx, args[0] = ac_to_integer(ctx, args[0]); - return ac_build_intrinsic(ctx, - "llvm.amdgcn.icmp.i32", + return ac_build_intrinsic(ctx, name, ctx->i64, args, 3, AC_FUNC_ATTR_NOUNWIND | AC_FUNC_ATTR_READNONE | @@ -465,6 +465,7 @@ ac_build_ballot(struct ac_llvm_context *ctx, LLVMValueRef ac_get_i1_sgpr_mask(struct ac_llvm_context *ctx, LLVMValueRef value) { + const char *name = HAVE_LLVM >= 0x900 ? "llvm.amdgcn.icmp.i64.i1" : "llvm.amdgcn.icmp.i1"; LLVMValueRef args[3] = { value, ctx->i1false, @@ -472,7 +473,7 @@ LLVMValueRef ac_get_i1_sgpr_mask(struct ac_llvm_context *ctx, }; assert(HAVE_LLVM >= 0x0800); - return ac_build_intrinsic(ctx, "llvm.amdgcn.icmp.i1", ctx->i64, args, 3, + return ac_build_intrinsic(ctx, name, ctx->i64, args, 3, AC_FUNC_ATTR_NOUNWIND | AC_FUNC_ATTR_READNONE | AC_FUNC_ATTR_CONVERGENT); |