From 478afbe525badde95b583dfd4852bd1234daa6de Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 4 Oct 2017 05:06:57 +0200 Subject: ac: use llvm.amdgcn.kill with LLVM 6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/amd/common/ac_llvm_build.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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), ""); -- cgit v1.2.3