summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-10-04 05:06:57 +0200
committerMarek Olšák <[email protected]>2017-10-24 14:56:34 +0200
commit478afbe525badde95b583dfd4852bd1234daa6de (patch)
treea0e54bbe8240decd1f510563af85db8b84888f4c /src/amd
parent1ff9e27cbdd1fe770f18e5316c6f32a867e39095 (diff)
ac: use llvm.amdgcn.kill with LLVM 6.0
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_llvm_build.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 5bd04663216..3e5b795d6fe 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -1407,6 +1407,12 @@ LLVMValueRef ac_build_cvt_pkrtz_f16(struct ac_llvm_context *ctx,
void ac_build_kill_if_false(struct ac_llvm_context *ctx, LLVMValueRef i1)
{
+ if (HAVE_LLVM >= 0x0600) {
+ ac_build_intrinsic(ctx, "llvm.amdgcn.kill", ctx->voidt,
+ &i1, 1, 0);
+ return;
+ }
+
LLVMValueRef value = LLVMBuildSelect(ctx->builder, i1,
LLVMConstReal(ctx->f32, 1),
LLVMConstReal(ctx->f32, -1), "");